Skip to content

Enable Cache to handle stale values #38

@hkraal

Description

@hkraal

As suggested by @bargulg in #22 there should be room for caches like Redis to clean up their own stale values. Currently the expired logic takes place in APIConnection.get() which decides if a cache would be valid or not.

My thoughts:

  • Determining if the cache is expired is not up to APIConnection but the loaded caching plugin
  • The caching plugin should decide if it wants to use a relative or absolute time
  • The code in APIConnection.get() shouldn't be doing more then res = cache.get('key'), if res.valid: ... and cache.put('key')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions