Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Cache pruning should be by LRU #2

@mnightingale

Description

@mnightingale

Currently the oldest files (by modified time) are purged from the cache.

It'd be better if the least recently used ones were purged first.

Complicated a bit by the removal of permanent and move to CacheStrategy.
Mutable relies on the modified time of the local file but we can't just touch the file on every request for possible performance reasons (IO) and it would mean you couldn't switch from doing immutable to mutable requests because you might have set the modified time on an out of date file.

Possible solution is a separate key/value cache keeping track of the access time for each uri.
It would also be useful for tracking response headers to improve the CacheStrategy.mutable (use the actual modified time and etag)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions