Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultTTL = 5 * time.Minute // Playlist refresh interval CleanupInterval = 1 * time.Minute // Expired entry cleanup )
Default cache configuration
View Source
const ( KeyMoodsList = "moods:list" KeyPlaylist = "playlist:%s" // playlist:{mood} )
Cache keys
Variables ¶
This section is empty.
Functions ¶
func PlaylistKey ¶
PlaylistKey returns the cache key for a mood's playlist.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a simple in-memory key-value store with TTL expiration.
func (*Cache) InvalidateMoods ¶
func (c *Cache) InvalidateMoods()
InvalidateMoods clears all mood-related cache entries.
Click to show internal directories.
Click to hide internal directories.