next.js
3e5abe56 - [use-cache] use computed size of the ReadableStream for LRU evicting (#75607)

Commit
1 year ago
[use-cache] use computed size of the ReadableStream for LRU evicting (#75607) ### What? The `default` cache handler does not use the computed size of the ReadableStream for LRU evicting. Because the default size is `1`, this ends up allowing up to 50M items in the LRU cache. ### How? - We now pass `(entry) => entry.size` as a second parameter to the `LRUCache` constructor - We also adjust the LRUCache size to 50MB instead of 50M bytes to be more consistent with other places (e.g. the static paths cache). --------- Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
Author
Parents
Loading