CLJS
basic-lein-cljs.core
cljs.analyzer
cljs.compiler
CLJS
cljs.core
CLJS
cljs.core.async
CLJS
cljs.core.async.impl.buffers
CLJS
cljs.core.async.impl.channels
CLJS
cljs.core.async.impl.dispatch
CLJS
cljs.core.async.impl.ioc-helpers
CLJS
cljs.core.async.impl.protocols
CLJS
cljs.core.async.impl.timers
cljs.env
cljs.externs
CLJS
cljs.js
cljs.js-deps
CLJS
cljs.pprint
CLJS
cljs.reader
CLJS
cljs.repl
cljs.source-map
CLJS
cljs.source-map
cljs.source-map.base64
CLJS
cljs.source-map.base64
cljs.source-map.base64-vlq
CLJS
cljs.source-map.base64-vlq
CLJS
cljs.spec.alpha
CLJS
cljs.spec.gen.alpha
cljs.tagged-literals
CLJS
cljs.tools.reader
CLJS
cljs.tools.reader.edn
CLJS
cljs.tools.reader.impl.commons
CLJS
cljs.tools.reader.impl.errors
CLJS
cljs.tools.reader.impl.inspect
CLJS
cljs.tools.reader.impl.utils
CLJS
cljs.tools.reader.reader-types
cljs.util
clojure.core
clojure.core.async
clojure.core.async.impl.buffers
clojure.core.async.impl.channels
clojure.core.async.impl.concurrent
clojure.core.async.impl.dispatch
clojure.core.async.impl.exec.threadpool
clojure.core.async.impl.ioc-macros
clojure.core.async.impl.mutex
clojure.core.async.impl.protocols
clojure.core.async.impl.timers
clojure.core.cache
clojure.core.memoize
clojure.core.protocols
clojure.core.server
clojure.data.json
clojure.data.priority-map
clojure.edn
clojure.instant
clojure.java.io
clojure.main
clojure.pprint
clojure.reflect
clojure.repl
clojure.set
CLJS
clojure.set
clojure.spec.alpha
clojure.spec.gen.alpha
clojure.string
CLJS
clojure.string
clojure.tools.analyzer
clojure.tools.analyzer.ast
clojure.tools.analyzer.env
clojure.tools.analyzer.jvm
clojure.tools.analyzer.jvm.utils
clojure.tools.analyzer.passes
clojure.tools.analyzer.passes.add-binding-atom
clojure.tools.analyzer.passes.cleanup
clojure.tools.analyzer.passes.constant-lifter
clojure.tools.analyzer.passes.elide-meta
clojure.tools.analyzer.passes.emit-form
clojure.tools.analyzer.passes.jvm.analyze-host-expr
clojure.tools.analyzer.passes.jvm.annotate-host-info
clojure.tools.analyzer.passes.jvm.annotate-loops
clojure.tools.analyzer.passes.jvm.annotate-tag
clojure.tools.analyzer.passes.jvm.box
clojure.tools.analyzer.passes.jvm.classify-invoke
clojure.tools.analyzer.passes.jvm.constant-lifter
clojure.tools.analyzer.passes.jvm.emit-form
clojure.tools.analyzer.passes.jvm.fix-case-test
clojure.tools.analyzer.passes.jvm.infer-tag
clojure.tools.analyzer.passes.jvm.validate
clojure.tools.analyzer.passes.jvm.validate-loop-locals
clojure.tools.analyzer.passes.jvm.validate-recur
clojure.tools.analyzer.passes.jvm.warn-on-reflection
clojure.tools.analyzer.passes.source-info
clojure.tools.analyzer.passes.trim
clojure.tools.analyzer.passes.uniquify
clojure.tools.analyzer.passes.warn-earmuff
clojure.tools.analyzer.utils
clojure.tools.cli
clojure.tools.namespace.dependency
clojure.tools.namespace.file
clojure.tools.namespace.find
clojure.tools.namespace.parse
clojure.tools.namespace.track
clojure.tools.reader
clojure.tools.reader.default-data-readers
clojure.tools.reader.impl.commons
clojure.tools.reader.impl.errors
clojure.tools.reader.impl.inspect
clojure.tools.reader.impl.utils
clojure.tools.reader.reader-types
clojure.walk
CLJS
clojure.walk
dynadoc.aliases
dynadoc.common
dynadoc.core
CLJS
dynadoc.core
dynadoc.example
CLJS
dynadoc.state
dynadoc.static
dynadoc.utils
dynadoc.watch
eval-soup.clojail
eval-soup.core
CLJS
eval-soup.core
CLJS
figwheel.client
CLJS
figwheel.client.file-reloading
CLJS
figwheel.client.heads-up
CLJS
figwheel.client.socket
CLJS
figwheel.client.utils
hawk.core
hawk.watcher
html-soup.core
ns-tracker.core
ns-tracker.dependency
ns-tracker.nsdeps
ns-tracker.parse
CLJS
oakcljs.tools.reader
CLJS
oakcljs.tools.reader.impl.commons
CLJS
oakcljs.tools.reader.impl.errors
CLJS
oakcljs.tools.reader.impl.inspect
CLJS
oakcljs.tools.reader.impl.utils
CLJS
oakcljs.tools.reader.reader-types
oakclojure.tools.reader
oakclojure.tools.reader.default-data-readers
oakclojure.tools.reader.impl.commons
oakclojure.tools.reader.impl.errors
oakclojure.tools.reader.impl.inspect
oakclojure.tools.reader.impl.utils
oakclojure.tools.reader.reader-types
org.httpkit.server
CLJS
paren-soup.console
CLJS
paren-soup.core
CLJS
paren-soup.dom
CLJS
paren-soup.instarepl
CLJS
reagent.core
CLJS
reagent.debug
CLJS
reagent.dom
CLJS
reagent.impl.batching
CLJS
reagent.impl.component
CLJS
reagent.impl.template
CLJS
reagent.impl.util
CLJS
reagent.ratom
ring.middleware.content-type
ring.middleware.file
ring.middleware.head
ring.middleware.keyword-params
ring.middleware.params
ring.middleware.reload
ring.middleware.resource
ring.util.codec
ring.util.io
ring.util.mime-type
ring.util.parsing
ring.util.request
ring.util.response
ring.util.time
rum.core
CLJS
rum.core
rum.cursor
rum.derived-atom
rum.server-render
rum.util
sablono.compiler
CLJS
sablono.core
sablono.normalize
sablono.util
tag-soup.core

clojure.core.cache

A caching library for Clojure.

(->BasicCache cache)

Positional factory function for class clojure.core.cache.BasicCache.

(->FIFOCache cache q limit)

Positional factory function for class clojure.core.cache.FIFOCache.

(->FnCache cache f)

Positional factory function for class clojure.core.cache.FnCache.

(->LIRSCache cache lruS lruQ tick limitS limitQ)

Positional factory function for class clojure.core.cache.LIRSCache.

(->LRUCache cache lru tick limit)

Positional factory function for class clojure.core.cache.LRUCache.

(->LUCache cache lu limit)

Positional factory function for class clojure.core.cache.LUCache.

(->SoftCache cache rcache rq)

Positional factory function for class clojure.core.cache.SoftCache.

(->TTLCache cache ttl ttl-ms)

Positional factory function for class clojure.core.cache.TTLCache.

CacheProtocol

This is the protocol describing the basic cache capability.

(basic-cache-factory base)

Returns a pluggable basic cache initialied to `base`

(evict cache e)

Removes an entry from the cache

(fifo-cache-factory base & {threshold :threshold, :or {threshold 32}})

Returns a FIFO cache with the cache and FIFO queue initialized to `base` -- the queue is filled as the values are pulled out of `base`. If the associative structure can guarantee ordering, then the said ordering will define the eventual eviction order. Otherwise, there are no guarantees for the eventual eviction ordering. This function takes an optional `:threshold` argument that defines the maximum number of elements in the cache before the FIFO semantics apply (default is 32). If the number of elements in `base` is greater than the limit then some items in `base` will be dropped from the resulting cache. If the associative structure used as `base` can guarantee sorting, then the last `limit` elements will be used as the cache seed values. Otherwise, there are no guarantees about the elements in the resulting cache.

(has? cache e)

Checks if the cache contains a value associated with `e`

(hit cache e)

Is meant to be called if the cache is determined to contain a value associated with `e`

(lookup cache e)

(lookup cache e not-found)

Retrieve the value associated with `e` if it exists, else `nil` in the 2-arg case. Retrieve the value associated with `e` if it exists, else `not-found` in the 3-arg case.

(lru-cache-factory base & {threshold :threshold, :or {threshold 32}})

Returns an LRU cache with the cache and usage-table initialied to `base` -- each entry is initialized with the same usage value. This function takes an optional `:threshold` argument that defines the maximum number of elements in the cache before the LRU semantics apply (default is 32).

(lu-cache-factory base & {threshold :threshold, :or {threshold 32}})

Returns an LU cache with the cache and usage-table initialied to `base`. This function takes an optional `:threshold` argument that defines the maximum number of elements in the cache before the LU semantics apply (default is 32).

(miss cache e ret)

Is meant to be called if the cache is determined to **not** contain a value associated with `e`

(seed cache base)

Is used to signal that the cache should be created with a seed. The contract is that said cache should return an instance of its own type.

(soft-cache-factory base)

Returns a SoftReference cache. Cached values will be referred to with SoftReferences, allowing the values to be garbage collected when there is memory pressure on the JVM. SoftCache is a mutable cache, since it is always based on a ConcurrentHashMap.

(through cache item)

(through value-fn cache item)

(through wrap-fn value-fn cache item)

The basic hit/miss logic for the cache system. Expects a wrap function and value function. The wrap function takes the value function and the item in question and is expected to run the value function with the item whenever a cache miss occurs. The intent is to hide any cache-specific cells from leaking into the cache logic itelf.

(ttl-cache-factory base & {ttl :ttl, :or {ttl 2000}})

Returns a TTL cache with the cache and expiration-table initialized to `base` -- each with the same time-to-live. This function also allows an optional `:ttl` argument that defines the default time in milliseconds that entries are allowed to reside in the cache.