Skip to content

Transform response before caching #771

Answered by amrendr-cb
amrendr-cb asked this question in Q&A
Discussion options

You must be logged in to vote

We can use the transformResponse API of Axios to provide our transformation method. After data transformation, the cache interceptor stores the transformed data in the cache.

With the fix #775, the cache interceptor no longer runs transformResponse twice on cached requests, which was causing unintended responses.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@amrendr-cb
Comment options

@amrendr-cb
Comment options

Answer selected by amrendr-cb
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