Expired cache files are not cleared |
Hi,
I have a problem, expired cache files are not cleared. Saving cache like (this for example) version CI 4.1.1 PHP Code: if (! $foo = cache('foo')) Files are supposed to delete themselves, right? Or do I have to do something manually to delete them? Thank you Ángel
If they do not delete you can do it yourself like so.
PHP Code: $cache = \Config\Services::cache(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Get the entire cache and loop one by one, so if it is expired it will return NULL and delete the file.
Code: $allDataCache = $this->cache->getCacheInfo(); |
Welcome Guest, Not a member yet? Register Sign In |