mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[PR #220] [MERGED] Use ttl cache instead of lru #1609
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1609
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/220
Author: @aome510
Created: 7/15/2023
Status: ✅ Merged
Merged: 7/15/2023
Merged by: @aome510
Base:
master← Head:use-ttl-cache📝 Commits (2)
978bd1breplacelruwithttl_cache5278b78update the cache usage tottl_cachefunctions📊 Changes
10 files changed (+82 additions, -68 deletions)
View changed files
📝
Cargo.lock(+17 -31)📝
spotify_player/Cargo.toml(+1 -1)📝
spotify_player/src/client/handlers.rs(+1 -1)📝
spotify_player/src/client/mod.rs(+40 -16)📝
spotify_player/src/event/page.rs(+1 -1)📝
spotify_player/src/event/window.rs(+1 -1)📝
spotify_player/src/state/data.rs(+17 -12)📝
spotify_player/src/state/mod.rs(+0 -1)📝
spotify_player/src/ui/page.rs(+3 -3)📝
spotify_player/src/ui/playback.rs(+1 -1)📄 Description
Replace
lrucache withttlcache.Context
Using
ttlcache avoids the problem that the cached Spotify data becomes invalid after sometimes. For example, daily mix playlist changes the list of tracks everyday, hence playing a song from the cached playlist won't work.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.