Packrat caches for the core/parse function.
A single cache instance is not intended to be used for multiple texts. Create a new cache for each new text.
Caches are implemented using the Cache protocol. This way you can implement your own, if desired.
Packrat caches for the core/parse function. A single cache instance is *not* intended to be used for multiple texts. Create a new cache for each new text. Caches are implemented using the Cache protocol. This way you can implement your own, if desired.
Protocol for packrat cache implementations.
Protocol for packrat cache implementations.
(cut this index)
Clear all cached results before given index.
Clear all cached results before given index.
(fetch this parser index)
Try to fetch a cached result, returns nil if it misses the cache.
Try to fetch a cached result, returns nil if it misses the cache.
(store this parser index result)
Store a result in the cache.
Store a result in the cache.
(treemap-cache)
Create a cache that supports clearing below a certain index, such that entries are evicted on cuts.
Create a cache that supports clearing below a certain index, such that entries are evicted on cuts.
(weak-treemap-cache)
Create a cache that supports clearing below a certain index and has weak references, such that entries are evicted on cuts or on memory pressure.
Create a cache that supports clearing below a certain index and has weak references, such that entries are evicted on cuts or on memory pressure.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close