Skip to content

Purge Entity Cache not clearing filtered routes #38

@abhijit-hl

Description

@abhijit-hl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions