Skip to content

FR: Add a LRU Cache debatable and predictable. wit #231

Open
@jesus-mg-ios

Description

@jesus-mg-ios

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions