Skip to content

evaluate replacing current caching library #12

@jondot

Description

@jondot

Suggestion / Feature Request

The current caching library works well and was very easy to use: https://github.com/rusty-ferris-club/backpack/blob/master/backpack/src/fetch.rs#L48

It is used in a forced way where the cache is kept static for a fixed amount of time. However a smarter strategy would be to:

  1. Have a short-lived cache with no network request (e.g. 1 day)
  2. When (1) expires, perform a cheap Etag/HEAD request to see if anything changed, and expire the cache if needed
  3. After a rather long period of time (e.g. 14 days) expire the cache in any case

Note:

We fetch content through git and through HTTP.

  • HTTP has natural caching facilities that can be used
  • see what's the best way to cache around git

This issue is for evaluation, so a good completion would be to just summarize your findings. A great completion of it would be a working implementation of a new cache mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions