update deps; improve caching

This commit is contained in:
Laptop
2025-03-20 22:38:28 +02:00
parent 2b84ba8748
commit 280e551230
7 changed files with 24 additions and 21 deletions

View File

@@ -37,7 +37,7 @@ type Playlist struct {
func GetPlaylist(cid string, permalink string) (Playlist, error) {
playlistsCacheLock.RLock()
if cell, ok := PlaylistsCache[permalink]; ok && cell.Expires.After(time.Now()) {
if cell, ok := PlaylistsCache[permalink]; ok {
playlistsCacheLock.RUnlock()
return cell.Value, nil
}