Module

jinks/cache

src/jinks/cache.pooka

A provider's cached answer has an expiry and a version, not a claim to be permanent truth. The caller supplies time so offline tests need no clock. Cache files never become published site files or watched source inputs.

API reference

function

name

src/jinks/cache.pooka:19
name(key: String) -> Result(String, String)
INFERREDfn(String) -> Result(String, String)
function

get

src/jinks/cache.pooka:27
get(root: String, key: String, now: Int) -> Result(Option(json.Json), String)
INFERREDfn(String, String, Int) -> Result(Option($package/pooka_json/pooka/json.Json), String)
function

put

src/jinks/cache.pooka:53
put(root: String, key: String, now: Int, ttl: Int, value: json.Json) -> Result(
  Nil,
  String
)
INFERREDfn(String, String, Int, Int, $package/pooka_json/pooka/json.Json) -> Result(Nil, String)
function

clear

src/jinks/cache.pooka:81
clear(root: String) -> Result(Nil, String)
INFERREDfn(String) -> Result(Nil, String)