When I flush the pages cache via cli it doesn’t clear the cache.
- Fresh startkit
- Turn on Cache in config.php
- Open the website via browser to fill the cache
- Confirm that the cache folder was created and a cache file exists. In my case
- Create flush.php in your root:
<?php require 'kirby/bootstrap.php'; $kirby = new Kirby(); $kirby->cache('pages')->flush();
php flush.phpon the command line
- Check the cache folder
_ localhost_starterkit. A new folder named
_got created and the cached page is still there:
dump($this->root()); in the flush method
So the root, or more specific the prefix is incorrect. How would Kirby know the domain name though? I can’t think of a way for Kirby to detect it since everything is running via cli.