-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Bug: Purge Entity Cache Doesn't Clear Filtered Route Cache
Plugin Name: strapi-cache
Strapi Version: 5.x
Plugin Version: Latest (as of July 2025)
Cache Strategy: Redis
Entity Type: Collection Type (cities)
When I click "Purge Entity Cache" for the cities collection type from the Strapi Admin panel, the cache for /api/cities/:id is successfully cleared.
However, any filtered or populated GET routes are not cleared, even though they reference the same entity, for example:
/api/cities?filters[city_name][$eq]=cityName&populate=city_section_info
These routes still return cached responses after entity purge, showing HIT in the logs.
Expected Behavior
When I click “Purge Entity Cache” for cities, it should also:
Invalidate any cache keys related to filtered or populated versions of cities
Optionally, support tag-based invalidation (ctx.state.cacheTags) if implemented