Welcome Guest, Not a member yet? Register   Sign In
How to use integrated Cache class in router.php?
#1

In one of my project I need to create a Dynamic Routing. It means that I need to change the routing regular regarding the different domain. And I store the routing regular of each domain in Memcache, which can be accessed through 127.0.0.1 port 11211.
Indeed now I can use origin PHP memcache class in router.php, but it seems too stupid. Maybe in the future I need to change to another cache system, like Redis or even MySQL. So how can I use the integrated Cache class in router.php?

Another question, as my former thread has mentioned, I'm using cache as autoload driver, how to designate a specific cache driver in autoload?

PHP Code:
$autoload['drivers'] = array('cache'); 
Reply


Messages In This Thread
How to use integrated Cache class in router.php? - by dangyuluo - 08-29-2015, 06:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB