Disable or delete cache - twigphp/cache-extra

138 Views Asked by At

I’ve implemented twigbridge in Laravel 10+ as my template system. It works well on its own, but I wanted a little extra control over caching processor intensive actions via the templates themselves using the {% cache %} tag. So I installed twigphp/cache-extra and configured that. It works as intended, but now I need to know a little more about it since there is VERY little documentation about it. Specifically how to clear/clean the cache on demand.

  1. Cache Storage - unlike the twig view cache which defaults to /storage/framework/views/twig, I cannot find where or how cache-extra stores its cache. It’s not the same folder because deleting those files has no effect. Where and how is this stored? Is there a way to configure storage path yourself?
  2. Cache-extra disabling - Twig view caching can be disabled using twigbridge.php cache => false, but I see no reference anywhere to disabling cache-extra. Is this possible, and if so, how?
  3. Cache-extra cleaning - The cache-extra documentation states two ways of invalidating cached values - using ttl() or using a cache-buster variable in the key. It does not say anything about whether these invalidated caches are auto-cleaned or whether they simply stay in the repository indefinitely. Does anyone know anything about this?
0

There are 0 best solutions below