Cacheing not working |
[eluser]dfreerksen[/eluser]
I'm playing with the new Cache drivers in Codeigniter and I'm having some troubles. I downloaded the latest code from Codeigniter Reactor. I am using the exact same sample cache code found in the User Guide at http://ellislab.com/codeigniter/user-gui...mple_usage I have verified both APC is supported and my application/cache/ directory is writable. The problem is, it never caches. If i do var_dump($this->cache->get_metadata('foo')); it returns false. Meaning it used the dummy cache. If I do something like this everything works just fine: $this->load->driver('cache'); $driver = 'file'; if ($this->cache->apc->is_supported()) { $driver = 'apc'; } if ( ! $foo = $this->cache->{$driver}->get('foo')) { echo 'Saving to the cache!<br />'; $foo = 'foobarbaz!'; $this->cache->{$driver}->save('foo', $foo, 300); } var_dump($this->cache->get_metadata('foo')); Am I missing something or doing something wrong? Is this a bug in the CI code? If this is a bug, does anyone have any idea how to fix this? I've been looking through the Cache code and haven't been able to find any issues yet. |
Messages In This Thread |
Cacheing not working - by El Forum - 04-22-2011, 09:37 AM
Cacheing not working - by El Forum - 07-08-2011, 03:54 PM
|