SettingsResumableCache

class SettingsResumableCache(settings: Settings = Settings()) : ResumableCache(source)

A ResumableCache implementation using com.russhwolf.settings.Settings. This implementation saves the urls on the disk. If you want a memory only cache, use Memory. Unsupported on Linux.

Constructors

Link copied to clipboard
constructor(settings: Settings = Settings())

Functions

Link copied to clipboard
open suspend override fun clear()

Clears the cache

Link copied to clipboard
open suspend override fun entries(): List<CachePair>

Returns all entries in the cache

Link copied to clipboard
open suspend override fun get(fingerprint: Fingerprint): ResumableCacheEntry?

Returns the resumable cache entry for the fingerprint or null if no url was stored

Link copied to clipboard
open suspend override fun remove(fingerprint: Fingerprint)

Removes the entry for the fingerprint

Link copied to clipboard
open suspend override fun set(fingerprint: Fingerprint, entry: ResumableCacheEntry)

Stores the entry for the fingerprint. The fingerprint consists of the bucket id, the file path and the file size