Skip to content

Is it possible to use Document Caching to invalidate a specific cache **only on success**? #3463

Closed Answered by kitten
k4a-l asked this question in Q&A
Discussion options

You must be logged in to vote

updateProject response is a boolean and does not include the __typeName
even when the updateProject fails, the cache is invalidated and reacquired.
reacquisition triggers a redraw of the screen content, so input is lost despite the failure.

I'm just boiling this down to the above three quotes first.

First of all,

even when the updateProject fails, the cache is invalidated and reacquired.

To state simply how the API works, once you “tag” a query and mutation with additionalTypenames, that’s a definitive tag. The safest option is to always invalidate.

In other words, although you have a specific case where invalidation isn't expected, the document cache especially will always err on the…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@k4a-l
Comment options

@kitten
Comment options

Answer selected by k4a-l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants