Removing queries from cache
Last updated
Was this helpful?
Last updated
Was this helpful?
You can manually remove a cached query from cache before its natural TTL-driven expiration time by using the method, here's an example:
Because query cache keys are automatically generated if you don't specify any when calling methods like and , you can only remove queries from cache that have been originally performed with a specific Cache key naming.
The most usual way to cache queries and then be able to remove them whenever we need is to use a known
uniqueId
for each query, like in the example above.