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

Add caching for A-Z listing and categories #241

Closed
dagwieers opened this issue May 16, 2019 · 0 comments · Fixed by #258
Closed

Add caching for A-Z listing and categories #241

dagwieers opened this issue May 16, 2019 · 0 comments · Fixed by #258
Labels
enhancement New feature or request
Milestone

Comments

@dagwieers
Copy link
Collaborator

dagwieers commented May 16, 2019

Describe the bug

Much like we now implemented the Favorites caching, we could do the same for other types of files. This implementation would not only offer speed improvements, it also offers redundancy.

Data illegible for caching could be:

  • A-Z listing (TTL: 1 hour)
  • Category listing (TTL: 1 week)
  • TV guide information (e.g. yesterday, today, tomorrow) (TTL: 1 hour)
  • Favorites (TTL: 1 hour)

The implementation would work like this:

  1. Before downloading a new listing, check if a recent cache exists
    • Use the cache if recent (timestamp < TTL)
  2. If cache is too old, attempt to download newer version
    a. If download failed, use cache anyway, update timestamp
    b. If download succeeded, hash content
    • If hash is different, save to disk
    • If hash is same, update timestamp

The troubleshooting settings would have an option to clear the caches.

@dagwieers dagwieers added the enhancement New feature or request label May 16, 2019
@dagwieers dagwieers added this to the Future milestone May 16, 2019
@dagwieers dagwieers modified the milestones: Future, v1.10.0 May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant