Caching - 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: Caching (/showthread.php?tid=77900) |
Caching - boddah85 - 11-03-2020 Hello Im trying to start development in codeigniter 4 and I have a little problem with web caching. I have blog where there's for example articles with comments. I would like to cache all pages but whenever user add a comment page needs to be refreshed. How I can manually delete cached page? PHP Code: public function show(string $title='', int $id=0) Do I need to clean all cached pages ($cache->clean()) or there's any way to delete choosen cached pages? Thanks in advance for any help RE: Caching - InsiteFX - 11-03-2020 I believe that you can use the cache delete, if you use a page name for the key. PHP Code: $cache->delete('page_name'); RE: Caching - boddah85 - 11-03-2020 Thanks for Your response. In this approach PHP Code: $this->cachePage(120); I can't set a page name. In cache folder i see some random names like 'b1547903222aa3e1d99833fa11afc3c3' |