core.cache is a Clojure contrib library providing the following features:
An underlying CacheProtocol used as the base abstraction for implementing new synchronous caches
A defcache macro for hooking your CacheProtocol implementations into the Clojure associative data capabilities.
Immutable implementations of some basic caching strategies
Implementation of an efficient buffer replacement policy based on the low inter-reference recency set algorithm (LIRSCache) described in the LIRS paper
Factory functions for each existing cache type
You can use core.cache in your Leiningen and Cake projects with the following :dependencies directive in your project.clj file:
[org.clojure/core.cache "0.6.2"]
For Maven-driven projects, use the following slice of XML in your pom.xml's <dependencies> section:
<dependency>
<groupId>org.clojure</groupId>
<artifactId>core.cache</artifactId>
<version>0.6.2</version>
</dependency>
Enjoy!
The v0.6.2 version of core.cache contains the following changes:
Removed reflection warnings.
Bug fix for LRU, LU and TTL caches disabling the eviction of duplicate keys prior to a threshold less than three.
FIFOCache respects threshold prior to applying its eviction policy.
The following capabilities are under design, development, or consideration for future versions of core.cache:
LIRSCache evictseed function implementationsMore planning is needed around capabilities not listed nor thought of.
Can you improve this documentation? These fine people already did:
Sean Corfield & fogusEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |