Skip to content

Create a generic cache #82

@kylecorry31

Description

@kylecorry31
  • Key
  • Value

Metadata

  • Last accessed time
  • Access count
  • Create time

Strategies

  • Out of space removal strategy
    • Determines which key to prune when out of space
    • Inputs: key being inserted, all valid keys and metadata, target size
    • Output: keys to remove
  • Key selection strategy
    • Given the list of keys and a new key, it returns the key to insert/update
    • Inputs: key being inserted, all valid keys and metadata
    • Output: key to insert/update
  • Expiration strategy
    • Run before any operation on the cache
    • Inputs: key being inserted (if any), all valid keys and metadata
    • Output: keys to remove
  • Storage strategy
    • The backing cache store
    • Operations: get, remove, insert, update, get all keys and metadata

The goal is to replace the geospatial and LRU caches with a single cache.

Another option could be to compose this with wrappers of some sort (ex. SpaceLimitedWrapper, ExpirationWrapper, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions