Package-level declarations
Optional response caching: io.github.rohang27.thesportsdb.cache.ResponseCache, the in-memory implementation, and the io.github.rohang27.thesportsdb.cache.CachePolicy that sets a time-to-live per kind of data.
Types
Link copied to clipboard
Link copied to clipboard
How quickly an endpoint's data changes. Every endpoint is tagged with one of these, and a CachePolicy turns it into a time-to-live.
Link copied to clipboard
class InMemoryResponseCache(maxEntries: Int, now: () -> Long = System::currentTimeMillis) : ResponseCache
A bounded, thread-safe, in-memory LRU cache with per-entry expiry.
Link copied to clipboard
interface ResponseCache
Stores raw response bodies. Keys never contain an API key. Implement this to back the cache with Redis, a database, disk, etc.