Welcome Guest, Not a member yet? Register   Sign In
Caching Question
#1

I'm using file caching to cache some of my pages, and it's working well - I'm simply using a line like this in each relevant controller. 
PHP Code:
$this->cachePage(DAY); 

I want to implement an Admin panel that lets me delete the cache for a specific page, but I can't work out what CI4 is using as the key. I've tried the md5 hash of the full URL of the page (e.g. https://www.example.org/blog/a-specific-blog-post) and also just the path (/blog/a-specific-blog-post), but neither seems to be the value being hashed.
How do I generate the key for a specific cached page so that I can then use the delete($key) method of the Caching Driver to delete the cache for that page?
Reply
#2

See https://github.com/codeigniter4/CodeIgni...he.php#L74
Simple CI 4 project for beginners codeigniter-expenses
Reply




Theme © iAndrew 2016 - Forum software by © MyBB