Rest4 / Rest4-php

PHP Rest Full of Rest Framework
http://rest4.org
GNU General Public License v3.0
3 stars 2 forks source link

Improve cache policy #23

Open nfroidure opened 11 years ago

nfroidure commented 11 years ago

In order to have a more modular cache system, caching resources should be set in the conf file and matche URIs with patterns (like for router, rights) that can:

It could look like that:

the URIs matched

cache.+.uri=/db/(._)
# the type of cache used
cache._.type=xcache
# the max file size (ko)
cache._.maxsize=100
# the cache lifetime (s)
cache._.lifetime=3600
cache.+.uri=/http/(._)
cache._.type=fs
cache._.maxsize=100000
cache._.lifetime=0

The main difficulty will be to find a way to register callbacks accross different cache systems. Many solutions: