Welcome Guest, Not a member yet? Register   Sign In
Database Cache fails to clear
#1

[eluser]ACEFX[/eluser]
Hi

I have a subfolder in my controller folder called "zones" and in it i have few number of controllers calling and data from database and caching them.

To delete the data once the user logs out, i used

Code:
$this->db->cache_delete('zones/student', 'general');

Which i believe should delete the information cached by the controller in the subfolder but the cache has refused to delete and even when i called the controller directly

Code:
$this->db->cache_delete('student', 'general');

and also tried

Code:
$this->db->cache_delete('zones.student', 'general');
and
Code:
$this->db->cache_delete('zones+student', 'general');

None worked, Can someone help me out, cause presently the cache are getting more than enough.

Thanks
#2

[eluser]SneakyDave[/eluser]
Yes, this appears to be a bug, the only way it seems to clear is if you do a full cache delete with
Code:
$this->db->cache_delete_all();

You may also want to check your database.php configuration file, and make sure there is a trailing slash for the $db['default']['cachedir'] value.

Also, I just found out that CI doesn't delete the controller+method ("blog+comments") directory in the cache directory, just the files. It appears the file contents are removed, and the directories are just left there.
#3

[eluser]ACEFX[/eluser]
Ok thanks man
I also did that cause i tried and tried but no way out.

Thanks alot




Theme © iAndrew 2016 - Forum software by © MyBB