I’ve been exploring the inner workings of NSCache and found it to be somewhat unpredictable and challenging to debug, lacking robust methods for effective cache management.
This led me to wonder: would it be feasible to introduce a thread-safe, manageable, and predictable LRUCache that can listen for system low memory warnings and respond according to customizable configurations? The key requirement is that this cache should remain in memory and not be evicted when the system goes into the background or the device is locked.
Creating a custom cache or relying on third-party solutions is quite cumbersome. In my opinion, Apple should address this gap. It’s increasingly uncommon for apps not to require such in-memory caching capabilities.
It would be great to develop a solution here, and perhaps Apple could eventually integrate it into the Foundation framework.
Hi Community,
I’ve been exploring the inner workings of NSCache and found it to be somewhat unpredictable and challenging to debug, lacking robust methods for effective cache management.
This led me to wonder: would it be feasible to introduce a thread-safe, manageable, and predictable LRUCache that can listen for system low memory warnings and respond according to customizable configurations? The key requirement is that this cache should remain in memory and not be evicted when the system goes into the background or the device is locked.
Creating a custom cache or relying on third-party solutions is quite cumbersome. In my opinion, Apple should address this gap. It’s increasingly uncommon for apps not to require such in-memory caching capabilities.
It would be great to develop a solution here, and perhaps Apple could eventually integrate it into the Foundation framework.
Best.