Cache Details (TTL? LRU?) #2750
-
I'm slightly worried about my application memory performance. We have a large number of keys used. I think I want to implement a TTL cache, but before doing that I want to insure that doing that kind of customization is even necessary. I read this but it isn't really clear what the end result was. What is the default implementation? Does the cache grow infinitely? Does it ever throw away keys if the size cache becomes large? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was looking this over for myself (user, not maintainer), and from what I can tell the cache grows indefinitely. I came to this conclusion because the default cache provider is a plain js swr/_internal/src/utils/config.ts Line 44 in e510955 |
Beta Was this translation helpful? Give feedback.
I was looking this over for myself (user, not maintainer), and from what I can tell the cache grows indefinitely.
I came to this conclusion because the default cache provider is a plain js
Map
object (swr/_internal/src/utils/config.ts
Line 44 in e510955