Caching data across paths
Unanswered
Palomino posted this in #help-forum
PalominoOP
Hello π
I've been trying out various caching options for my app (including unstable_cache and fetch cache), though it seems they only cache their return values on a per-path basis. When navigating between different paths, data is always fetched anew.
I do perform a few slower api calls that are common across multiple paths in my app (such as querying whether a github repo is public) and these operations can take up quite significant time (~1s), so I'd prefer reusing the reuslt whenever possible.
Is there a built-in way of persisting data across routes? Should I opt for an external cache such as Redis?
Node version used: 14.2.5
I've been trying out various caching options for my app (including unstable_cache and fetch cache), though it seems they only cache their return values on a per-path basis. When navigating between different paths, data is always fetched anew.
I do perform a few slower api calls that are common across multiple paths in my app (such as querying whether a github repo is public) and these operations can take up quite significant time (~1s), so I'd prefer reusing the reuslt whenever possible.
Is there a built-in way of persisting data across routes? Should I opt for an external cache such as Redis?
Node version used: 14.2.5