Open js-choi opened 2 years ago
The withdrawn WICG memory-pressure proposal lists several use cases related to memory pressure and therefore to caching in general:
- An application with an infinite-scroll wants to know if they need to remove items from their list and how agressively.
- An application handling large files (photo/video sharing for example) wants to free up cache when the user's device need it.
- An email application saving email content for fast interaction wants to free up the cache if it is needed by the system.
My primary use case is to give control to the developer over the caches that the memo function would use for function memoization. For example, Python offers a LRU policy with a customizable limit.
@syg from V8 said:
@rickbutton added:
We need to come up with specific isolated illustrations of these use cases and check if they would be adequately served by Map-like data structures with constant limits.