![]() |
Cache doesn't work, InfoCache.php throws errors - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Cache doesn't work, InfoCache.php throws errors (/showthread.php?tid=91097) |
Cache doesn't work, InfoCache.php throws errors - minsk832 - 06-16-2024 I'm trying to figure out why my caching isn't working. It's set to filesystem Code: public string $handler = 'file';) In the controller method I use: Code: $this->cachePage($this->cacheTTL); The controller property is defined as: Code: protected $cacheTTL = 604800; Nothing is created under writeable/cache. In the console, Code: php spark cache:info Quote:CodeIgniter v4.5.2 Command Line Tool - Server Time: 2024-06-16 16:02:35 UTC+02:00 This error should not actually occur because there is a check: Code: if ($config->handler !== 'file') { Edit: Code: var_dump(cache()->isSupported('file')); => bool(true) I do not get it ![]() Solution: Through further debugging, I discovered that the write protection is always set by Windows Explorer. I was able to solve it using cmd and then Code: attrib -r "C:\path\ci4directory\writable" /S /D |