GenieCache.purge
— Methodpurge(key::Any) :: Nothing
Removes the cache data stored under the key
key.
GenieCache.purgeall
— Methodpurgeall(; dir::String = "") :: Nothing
Removes all cached data.
GenieCache.withcache
— Functionwithcache(f::Function, key::Any, expiration::Int = GenieCache.cache_duration(); dir = "", condition::Bool = true)
Executes the function f
and stores the result into the cache for the duration (in seconds) of expiration
. Next time the function is invoked, if the cache has not expired, the cached result is returned skipping the function execution. The optional dir
param is used to designate the folder where the cache will be stored (within the configured cache folder). If condition
is false
caching will be skipped.
GenieCacheFileCache.cache_path
— Methodcache_path(key::Any; dir::String = "") :: String
Computes the path to a cache key
based on current cache settings.
GenieCacheFileCache.fromcache
— Methodfromcache(key::Any, expiration::Int; dir::String = "") :: Union{Nothing,Any}
Retrieves from cache the object stored under the key
key if the expiration
delta (in seconds) is in the future.
GenieCacheFileCache.tocache
— Methodtocache(key::Any, content::Any; dir::String = "") :: Nothing
Persists content
onto the file system under the key
key.