Skip to content

Add proper LRU cache for ParseFile #98

Open
@grantland

Description

@grantland

Right now we throw everything into Android's cache directory and don't really do anything to clean it up. We're adding File APIs to allow developers can manage the cached files, but it'd be great to follow Android's recommendations when utilizing the cache directory ourselves.

What we'd need to do is have a cache manager that:

  • Clears all staging (.tmp) files on launch
  • Keeps track of files that have been least recently used (we use File modification date for this on iOS)
  • Does not allow files larger than MAX_CACHE_SIZE to be stored in the cache
  • Evicts files in the cache that have been least recently used when total size of the cache goes above MAX_CACHE_SIZE

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions