Cache is not invalidated

william - 2 months ago

{% set newslist = entries('posts').recent().paginate() %}
{% cache newslist 100 %}
    {% include "theme::news/news-item" with {"newslist": newslist} %}
{% endcache %}

According to the documentation, if i understand it, i would be able to use that collection as a cache key and it would be cleared if i create a new news (news is posts).

william - 2 months ago

Works with get but not with pagination. So i guess that is OK, since it would be messed up otherwise.

ryanthompson - 2 months ago

Spin up an issue for this I can add it. Should be pretty straight forward to get a cache key like this.

william - 2 months ago