How to clear twig cache by key?
Created 7 years ago by mattcdavis1Craft CMS has a deleteCacheById() method but not sure what Pyro has. I suppose this would be a non-issue if the database driver worked but in the meantime is there currently a way to clear cache by key?
mattcdavis1
—
7 years ago
- As far as the database issue - was referring to this: https://github.com/pyrocms/pyrocms/issues/4297
- Was referring to twig specific cache. So if i do this:
{% cache 'my-cache-key' 9000 %} {% include 'theme::real-estate.properties.' ~ layout %} {% endcache %}
How would i clear just "my-cache-key" from twig cache?
Now that the database driver is working, i can just run a SQL query to delete this entry but wan't sure if there was a way to do this through twig like Craft has ("deleteCacheById()")
BTW - there is some funky parsing going on with these forum comments. if i use backticks at any point after my first set of backticks it throws in a bunch of content from another area in my comment.
Can you explain "if the database driver worked"? There is no cache clearing by key within the twig template. You could try
flushCache
is all.. or are you referring to Twig specific cache and not model bound cache?