Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (62 sloc) 3.246 kB
2715844 @fogus Importing Clache without LIRS and Soft caches. The former is awaitin…
fogus authored
1 # clojure.core.cache - A Clojure Caching Library
2
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
3 core.cache is a new Clojure contrib library providing the following features:
2715844 @fogus Importing Clache without LIRS and Soft caches. The former is awaitin…
fogus authored
4
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
5 * An underlying `CacheProtocol` used as the base abstraction for implementing new synchronous caches
878fd3e @fogus more information into the readme
fogus authored
6
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
7 * A `defcache` macro for hooking your `CacheProtocol` implementations into the Clojure associative data capabilities.
878fd3e @fogus more information into the readme
fogus authored
8
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
9 * Immutable implementations of some basic caching strategies
10 - First-in-first-out (FIFOCache)
11 - Least-recently-used (LRUCache)
12 - Least-used (LUCache)
13 - Time-to-live (TTLCache)
14 - Naive cache (BasicCache)
15
16 * Implementation of an efficient buffer replacement policy based on the *low inter-reference recency set* algorithm (LIRSCache) described in the [LIRS](http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.116.2184) paper
17
18 * Factory functions for each existing cache type
19
20 core.cache is based on a library named Clache, found at http://github.com/fogus/clache that is planned for deprecation.
21
22
23 Using
24 -----
25
26 You can use core.cache in your [Leiningen](https://github.com/technomancy/leiningen) and [Cake](https://github.com/flatland/cake) projects with the following `:dependencies` directive in your `project.clj` file:
27
28 [org.clojure/core.cache "0.5.0"]
29
30 For Maven-driven projects, use the following slice of XML in your `pom.xml`'s `<dependencies>` section:
31
32 <dependency>
33 <groupId>org.clojure</groupId>
34 <artifactId>core.cache</artifactId>
35 <version>0.5.0</version>
36 </dependency>
37
38 Enjoy!
39
40
41 Places
42 ------
43
44 * [Source code](https://github.com/clojure/core.cache)
45 * [Ticket system](http://dev.clojure.org/jira/browse/CCACHE)
46 * [Announcement](http://groups.google.com/group/clojure/browse_frm/thread/69d08572ab265dc7)
a052bb5 @fogus rearranging factory arglists
fogus authored
47 * [Examples and documentation](http://github.com/clojure/core.cache/wiki)
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
48
49
50 Changes from Clache
51 -------------------
52
53 The v0.5.0 version of core.cache is based almost wholly on the final version of Clache, with the following changes:
54
55 * An addition of an `evict` function on the `CacheProtocol` used to explicitly remove a value from a cache based on a key. All of the existing cache types implement this function *except* for `LIRSCache`.
56
57 * The addition of cache factory functions for all of the existing cache types
58
59 * The associative structure behaviors are defined solely in terms of the underlying `CacheProtocol`
60
61 * The `SoftCache` implementation was buggy and removed for now
62
63
64 Plans
65 -----
66
67 The following capabilities are under design, development, or consideration for future versions of core.cache:
68
69 * Asynchronous caching protocol
70 * `LIRSCache evict`
71 * Removal of the `seed` function from the `CacheProtocol`
72 * Reimplementation of a cache based on soft references
73 * test.generative usage
74 * Deprecation of Clache
75 * Documentation and examples
76
77 More planning is needed around capabilities not listed nor thought of.
78
79
80 Contributors
81 ------------
878fd3e @fogus more information into the readme
fogus authored
82
83 core.cache would not exist if not for the inspiration and contributions of the following people:
84
85 * [Meikel Brandmeyer](http://kotka.de)
86 * [Fogus](http://fogus.me/fun)
87 * [Sebastián Galkin](http://github.com/paraseba)
88 * [Jan Oberhagemann](http://github.com/deduktion)
89
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
90
91 References
92 ----------
878fd3e @fogus more information into the readme
fogus authored
93
94 TODO
2715844 @fogus Importing Clache without LIRS and Soft caches. The former is awaitin…
fogus authored
95
d4cfdc5 @fogus CCACHE-6: Added relevant info to README and release-notes
fogus authored
96
97 License
98 -------
2715844 @fogus Importing Clache without LIRS and Soft caches. The former is awaitin…
fogus authored
99
878fd3e @fogus more information into the readme
fogus authored
100 Copyright © 2011 Rich Hickey
2715844 @fogus Importing Clache without LIRS and Soft caches. The former is awaitin…
fogus authored
101
878fd3e @fogus more information into the readme
fogus authored
102 Licensed under the EPL. (See the file epl.html.)
Something went wrong with that request. Please try again.