No matching definitions.

notebook/cache

src/notebook/cache.tur
defn

cache-open

(cache-open [dir :cstr])

open a cache rooted at the given directory.

dircache directory path, or "" to use .turnb-cache

An opaque cache handle.

(cache-open ".turnb-cache")

Since: notebook-v0.1.0

defn

cache-close

(cache-close [cache :int])

free a cache handle.

cachecache handle returned by cache-open
(cache-close cache)

Since: notebook-v0.1.0

defn

cache-get

(cache-get [cache :int key :cstr])

load a cached cell-output by key, or 0 on miss.

cachecache handle returned by cache-open
keySHA-256 cache key

A cell-output-compatible handle, or 0 if the key is absent.

(cache-get cache "abc123")

Since: notebook-v0.1.0

defn

cache-put

(cache-put [cache :int key :cstr output :int])

write a cell-output to disk under the given key.

cachecache handle returned by cache-open
keySHA-256 cache key
outputcell-output handle to persist
(cache-put cache key output)

Since: notebook-v0.1.0

defn

cache-clear

(cache-clear [cache :int])

remove every cached entry from the cache directory.

cachecache handle returned by cache-open
(cache-clear cache)

Since: notebook-v0.1.0

Internal definitions
__nbc-cache-dir-default
__nbc-cstr-empty?
__nbc-cache-make
__nbc-ensure-dir
__nbc-path