Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluate replacing current caching library #12

Open
jondot opened this issue Dec 3, 2022 · 0 comments
Open

evaluate replacing current caching library #12

jondot opened this issue Dec 3, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jondot
Copy link
Member

jondot commented Dec 3, 2022

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.

@jondot jondot added enhancement New feature or request good-first-issue good first issue Good for newcomers and removed good-first-issue labels Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant