You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meaning that, given one input, it always give the same output.
72
72
73
+
### TTL
74
+
75
+
To use a time-to-live:
76
+
```js
77
+
constmemoized=memoize(fn, {
78
+
ttl:100// ms
79
+
})
80
+
```
81
+
82
+
`ttl` is used to expire/delete cache keys. Valid time range up to 24 hours.
83
+
84
+
Note: cache entries not groomed aggressively for performance reasons, so a cache entry may reside in memory for up to `ttl * 2` before actually being purged. However, if a cache entry is accessed anytime after its expiration, it will then be immediately deleted and re-calculated.
85
+
73
86
## Benchmark
74
87
75
88
For an in depth explanation on how this library was created, go read
0 commit comments