Cache handling for queries #2708
Unanswered
NatanielMarmucki
asked this question in
Q&A
Replies: 1 comment 7 replies
-
|
Looking at query caching, do I need to clear all records from the “address” cache instead of selecting a specific record? @clearCache(type: "Query", field: "address")I’m wondering if there’s a way to clear just individual cache entries rather than wiping the entire cache for the |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m working on implementing cache handling for queries. The cache itself works fine and gets created properly, but I’m having issues with cache invalidation.
I have these queries:
When deleting a record, I want to clear the cache for both
addressesandaddress:The cache gets cleared for
addresses, but not foraddress. What could be causing this?I can see that it generates a cache tag like
lighthouse:Query::address:id:01k1dmfx78w412pwdh4hcj3pzk, but on the Lighthouse side, it generateslighthouse:Query:01k1dmfx78w412pwdh4hcj3pzk:addressfor the@clearCache(type: "Query", field: "address", idSource: { argument: "id" })directive.Beta Was this translation helpful? Give feedback.
All reactions