Skip to content
fogus edited this page Mar 14, 2012 · 3 revisions

LIRS cache

The low inter-reference recency set cache is one that, like LRU, uses recency as its basis for behavior. Unlike, LRU however, LIRS uses access recency of other cache elements relative to any other block to determine its eviction policy.

General usage

To create a core.cache LRUCache instance you can do the following:

    (ns your.lib 
      (:require [clojure.core.cache :as cache]))
	
    (def C (cache/lirs-cache-factory {}))

Most of the trival examples will likely look very similar to the examples found in the LRU page. See the discussion in the next section why you might wish to choose LIRS instead.

LIRS cache use cases

TODO

Clone this wiki locally