diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn
deleted file mode 100644
index f40cd26..0000000
--- a/.clj-kondo/config.edn
+++ /dev/null
@@ -1 +0,0 @@
-{:lint-as {clojure.core.cache/defcache clojure.core/defrecord}}
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
deleted file mode 100644
index 686625a..0000000
--- a/.github/PULL_REQUEST_TEMPLATE
+++ /dev/null
@@ -1,14 +0,0 @@
-Hi! Thanks for your interest in contributing to this project.
-
-Clojure contrib projects do not use GitHub issues or pull requests, and
-require a signed Contributor Agreement. If you would like to contribute,
-please read more about the CA and sign that first (this can be done online).
-
-Then go to this project's issue tracker in JIRA to create tickets, update
-tickets, or submit patches. For help in creating tickets and patches,
-please see:
-
-- Signing the CA: https://clojure.org/community/contributing
-- Creating Tickets: https://clojure.org/community/creating_tickets
-- Developing Patches: https://clojure.org/community/developing_patches
-- Contributing FAQ: https://clojure.org/community/contributing
diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml
deleted file mode 100644
index 65beb66..0000000
--- a/.github/workflows/doc-build.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-name: Build API Docs
-
-permissions:
- contents: write
-
-on:
- workflow_dispatch:
-
-jobs:
- call-doc-build-workflow:
- uses: clojure/build.ci/.github/workflows/doc-build.yml@master
- with:
- project: clojure/core.cache
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 286cf95..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Release on demand
-
-permissions:
- contents: write
-
-on:
- workflow_dispatch:
- inputs:
- releaseVersion:
- description: "Version to release"
- required: true
- snapshotVersion:
- description: "Snapshot version after release"
- required: true
-
-jobs:
- call-release:
- uses: clojure/build.ci/.github/workflows/release.yml@master
- with:
- releaseVersion: ${{ github.event.inputs.releaseVersion }}
- snapshotVersion: ${{ github.event.inputs.snapshotVersion }}
- secrets: inherit
\ No newline at end of file
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
deleted file mode 100644
index 9fdad8c..0000000
--- a/.github/workflows/snapshot.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-name: Snapshot on demand
-
-permissions:
- contents: read
-
-on: [workflow_dispatch]
-
-jobs:
- call-snapshot:
- uses: clojure/build.ci/.github/workflows/snapshot.yml@master
- secrets: inherit
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index 2cc441a..0000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: Test
-
-permissions:
- contents: read
-
-on: [push]
-
-jobs:
- call-test:
- uses: clojure/build.ci/.github/workflows/test.yml@master
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index fa951c1..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.classpath
-.clj-kondo/.cache
-.cpcache/
-.idea
-.lein*
-.lsp/.cache
-.nrepl-port
-.portal/vs-code.edn
-.project
-.settings
-.vscode
-/build.boot
-lib
-multi-lib
-target
-.calva/repl.calva-repl
-.calva/mcp-server/port
diff --git a/.rebel_readline_history b/.rebel_readline_history
deleted file mode 100644
index a619ae0..0000000
--- a/.rebel_readline_history
+++ /dev/null
@@ -1,18 +0,0 @@
-1771730881107:(require '[clojure.core.cache :as cache] '[clojure.core.cache.wrapped :as cache-wrapped])
-1771730883786:(let [thread-count 20\n cache-atom (-> {}\n (cache/ttl-cache-factory :ttl 120000)\n (cache/lu-cache-factory :threshold 100)\n (atom))\n latch (java.util.concurrent.CountDownLatch. thread-count)\n invocations-counter (atom 0)]\n (doseq [i (range thread-count)]\n (println "starting thread" i)\n (.start (Thread. (fn []\n (cache-wrapped/lookup-or-miss cache-atom "my-key"\n (fn [k]\n (swap! invocations-counter inc)\n (Thread/sleep 3000)\n "some value"))\n (.countDown latch)))))\n (.await latch)\n (deref invocations-counter))
-1771874817202:(force (delay ((fn [] (throw (Exception. "bad"))))))
-1771874830891:(def x (force (delay ((fn [] (throw (Exception. "bad")))))))
-1771874832688:x
-1771875362757:(def p (promise))
-1771875366556:(realized? p)
-1771875376098:(deliver p 42)
-1771875377638:(realized? p)
-1771875417454:(force p)
-1771875420076:p
-1771875423512:@p
-1771879609917:(def x (delay (throw (Exception. "bad"))))
-1771879610748:x
-1771879620704:(force x)
-1771879622323:x
-1771879802447:(def x (with-meta (delay (throw (Exception. "bad"))) {::core.cache.added true}))
-1771885580329:(source force)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 17e4617..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a [Clojure contrib] project.
-
-Under the Clojure contrib [guidelines], this project cannot accept
-pull requests. All patches must be submitted via [JIRA].
-
-See [Contributing] on the Clojure website for
-more information on how to contribute.
-
-[Clojure contrib]: https://clojure.org/community/contrib_libs
-[Contributing]: https://clojure.org/community/contributing
-[JIRA]: http://clojure.atlassian.net/browse/CCACHE
-[guidelines]: https://clojure.org/community/contrib_howto
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index e246f6a..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,205 +0,0 @@
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
-CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation
- distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
- i) changes to the Program, and
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from and are
- distributed by that particular Contributor. A Contribution 'originates'
- from a Contributor if it was added to the Program by such Contributor
- itself or anyone acting on such Contributor's behalf. Contributions do not
- include additions to the Program which: (i) are separate modules of
- software distributed in conjunction with the Program under their own
- license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents" mean patent claims licensable by a Contributor which are
-necessarily infringed by the use or sale of its Contribution alone or when
-combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this
-Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
-
-2. GRANT OF RIGHTS
- a) Subject to the terms of this Agreement, each Contributor hereby grants
- Recipient a non-exclusive, worldwide, royalty-free copyright license to
- reproduce, prepare derivative works of, publicly display, publicly
- perform, distribute and sublicense the Contribution of such Contributor,
- if any, and such derivative works, in source code and object code form.
- b) Subject to the terms of this Agreement, each Contributor hereby grants
- Recipient a non-exclusive, worldwide, royalty-free patent license under
- Licensed Patents to make, use, sell, offer to sell, import and otherwise
- transfer the Contribution of such Contributor, if any, in source code and
- object code form. This patent license shall apply to the combination of
- the Contribution and the Program if, at the time the Contribution is
- added by the Contributor, such addition of the Contribution causes such
- combination to be covered by the Licensed Patents. The patent license
- shall not apply to any other combinations which include the Contribution.
- No hardware per se is licensed hereunder.
- c) Recipient understands that although each Contributor grants the licenses
- to its Contributions set forth herein, no assurances are provided by any
- Contributor that the Program does not infringe the patent or other
- intellectual property rights of any other entity. Each Contributor
- disclaims any liability to Recipient for claims brought by any other
- entity based on infringement of intellectual property rights or
- otherwise. As a condition to exercising the rights and licenses granted
- hereunder, each Recipient hereby assumes sole responsibility to secure
- any other intellectual property rights needed, if any. For example, if a
- third party patent license is required to allow Recipient to distribute
- the Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
- d) Each Contributor represents that to its knowledge it has sufficient
- copyright rights in its Contribution, if any, to grant the copyright
- license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under
-its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
- b) its license agreement:
- i) effectively disclaims on behalf of all Contributors all warranties
- and conditions, express and implied, including warranties or
- conditions of title and non-infringement, and implied warranties or
- conditions of merchantability and fitness for a particular purpose;
- ii) effectively excludes on behalf of all Contributors all liability for
- damages, including direct, indirect, special, incidental and
- consequential damages, such as lost profits;
- iii) states that any provisions which differ from this Agreement are
- offered by that Contributor alone and not by any other party; and
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
- b) a copy of this Agreement must be included with each copy of the Program.
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution,
-if
-any, in a manner that reasonably allows subsequent Recipients to identify the
-originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with
-respect to end users, business partners and the like. While this license is
-intended to facilitate the commercial use of the Program, the Contributor who
-includes the Program in a commercial product offering should do so in a manner
-which does not create potential liability for other Contributors. Therefore,
-if a Contributor includes the Program in a commercial product offering, such
-Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
-every other Contributor ("Indemnified Contributor") against any losses,
-damages and costs (collectively "Losses") arising from claims, lawsuits and
-other legal actions brought by a third party against the Indemnified
-Contributor to the extent caused by the acts or omissions of such Commercial
-Contributor in connection with its distribution of the Program in a commercial
-product offering. The obligations in this section do not apply to any claims
-or Losses relating to any actual or alleged intellectual property
-infringement. In order to qualify, an Indemnified Contributor must:
-a) promptly notify the Commercial Contributor in writing of such claim, and
-b) allow the Commercial Contributor to control, and cooperate with the
-Commercial Contributor in, the defense and any related settlement
-negotiations. The Indemnified Contributor may participate in any such claim at
-its own expense.
-
-For example, a Contributor might include the Program in a commercial product
-offering, Product X. That Contributor is then a Commercial Contributor. If
-that Commercial Contributor then makes performance claims, or offers
-warranties related to Product X, those performance claims and warranties are
-such Commercial Contributor's responsibility alone. Under this section, the
-Commercial Contributor would have to defend claims against the other
-Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
-IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
-Recipient is solely responsible for determining the appropriateness of using
-and distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to the
-risks and costs of program errors, compliance with applicable laws, damage to
-or loss of data, programs or equipment, and unavailability or interruption of
-operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
-LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
-EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of the
-remainder of the terms of this Agreement, and without further action by the
-parties hereto, such provision shall be reformed to the minimum extent
-necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Program itself
-(excluding combinations of the Program with other software or hardware)
-infringes such Recipient's patent(s), then such Recipient's rights granted
-under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and does
-not cure such failure in a reasonable period of time after becoming aware of
-such noncompliance. If all Recipient's rights under this Agreement terminate,
-Recipient agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient's obligations under this Agreement
-and any licenses granted by Recipient relating to the Program shall continue
-and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in
-order to avoid inconsistency the Agreement is copyrighted and may only be
-modified in the following manner. The Agreement Steward reserves the right to
-publish new versions (including revisions) of this Agreement from time to
-time. No one other than the Agreement Steward has the right to modify this
-Agreement. The Eclipse Foundation is the initial Agreement Steward. The
-Eclipse Foundation may assign the responsibility to serve as the Agreement
-Steward to a suitable separate entity. Each new version of the Agreement will
-be given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version of the
-Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly
-stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
-licenses to the intellectual property of any Contributor under this Agreement,
-whether expressly, by implication, estoppel or otherwise. All rights in the
-Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to this
-Agreement will bring a legal action under this Agreement more than one year
-after the cause of action arose. Each party waives its rights to a jury trial in
-any resulting litigation.
-
-
diff --git a/README.md b/README.md
deleted file mode 100644
index dcc2dc2..0000000
--- a/README.md
+++ /dev/null
@@ -1,240 +0,0 @@
-clojure.core.cache
-========================================
-
-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.
-
-* Implementations of some basic in-memory caching strategies
- - First-in-first-out (FIFOCache)
- - Least-recently-used (LRUCache)
- - Least-used (LUCache -- sometimes called Least Frequently Used)
- - Time-to-live (TTLCacheQ)
- - Naive cache (BasicCache)
- - Naive cache backed with soft references (SoftCache)
-
-* 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
-
-* Factory functions for each existing cache type
-
-* Caches are generally in-memory and immutable and should be used in conjunction with Clojure's state management, such as `atom`. SoftCache is the exception here, an in-memory cache built on top of mutable Java collections, but it can be treated as an immutable cache as well.
-
-The `clojure.core.cache` namespace contains the immutable in-memory caches themselves.
-The `clojure.core.cache.wrapped` namespace contains the same API operating on caches wrapped in atoms, which is the "normal" use in the wild (introduced in 0.8.0).
-
-core.cache is based on an old library named Clache that has been thoroughly deprecated.
-
-The `core.cache` API is hard to use correctly. That's why `clojure.core.cache.wrapped/lookup-or-miss` exists: it encapsulates all the best practices around using the API _and_ wraps it in an `atom` from the get-go. Read this article about [the `core.cache` API](https://dev.to/dpsutton/exploring-the-core-cache-api-57al) by Dan Sutton for why it is important to use the API correctly!
-
-Releases and Dependency Information
-========================================
-
-This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.
-
-Latest stable release: 1.2.259
-
-* [All Released Versions](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22core.cache%22)
-* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~core.cache~~~)
-
-[CLI/`deps.edn`](https://clojure.org/reference/deps_edn) dependency information:
-
-```clojure
-org.clojure/core.cache {:mvn/version "1.2.259"}
-```
-
-[Leiningen](https://github.com/technomancy/leiningen) dependency information:
-
- [org.clojure/core.cache "1.2.259"]
-
-[Maven](http://maven.apache.org/) dependency information:
-
-
+
+ ++ ++
+ ->BasicCache function clojure.core.cache Positional factory function for class clojure.core... + basic-cache-factory function clojure.core.cache Returns a pluggable basic cache initialized to `ba... + basic-cache-factory function clojure.core.cache.wrapped Returns a pluggable basic cache initialize... + BasicCache type clojure.core.cache + ++
+ CacheProtocol protocol clojure.core.cache This is the protocol describing the basic cache ca...
+
+
++ ++
+ evict function clojure.core.cache Removes an entry from the cache. + evict function clojure.core.cache.wrapped Removes an entry from the cache. Returns ... + ++
+ ->FIFOCache function clojure.core.cache Positional factory function for class clojure.core... + ->FnCache function clojure.core.cache Positional factory function for class clojure.core... + fifo-cache-factory function clojure.core.cache Returns a FIFO cache with the cache and FIFO queue... + fifo-cache-factory function clojure.core.cache.wrapped Returns a FIFO cache with the cache and FI... + FIFOCache type clojure.core.cache + FnCache type clojure.core.cache + ++
+ ++
+ has? function clojure.core.cache Checks if the cache contains a value associated wi... + has? function clojure.core.cache.wrapped Checks if the cache contains a value assoc... + hit function clojure.core.cache Is meant to be called if the cache is determined t... + hit function clojure.core.cache.wrapped Is meant to be called if the cache is dete... + ++
+ ++
+ ++
+ ++
+ ->LIRSCache function clojure.core.cache Positional factory function for class clojure.core... + ->LRUCache function clojure.core.cache Positional factory function for class clojure.core... + ->LUCache function clojure.core.cache Positional factory function for class clojure.core... + lirs-cache-factory function clojure.core.cache Returns an LIRS cache with the S & R LRU lists set... + lirs-cache-factory function clojure.core.cache.wrapped Returns an LIRS cache with the S & R LRU l... + LIRSCache type clojure.core.cache + lookup function clojure.core.cache Retrieve the value associated with `e` if it exist... + lookup function clojure.core.cache.wrapped Retrieve the value associated with `e` if ... + lookup-or-miss function clojure.core.cache.wrapped Retrieve the value associated with `e` if ... + lru-cache-factory function clojure.core.cache Returns an LRU cache with the cache and usage-tabl... + lru-cache-factory function clojure.core.cache.wrapped Returns an LRU cache with the cache and us... + LRUCache type clojure.core.cache + lu-cache-factory function clojure.core.cache Returns an LU cache with the cache and usage-table... + lu-cache-factory function clojure.core.cache.wrapped Returns an LU cache with the cache and usa... + LUCache type clojure.core.cache + ++
+ miss function clojure.core.cache Is meant to be called if the cache is determined t... + miss function clojure.core.cache.wrapped Is meant to be called if the cache is dete... + ++
+ ++
+ ++
+ ++
+ ++
+ ++
+ ->SoftCache function clojure.core.cache Positional factory function for class clojure.core... + seed function clojure.core.cache Is used to signal that the cache should be created... + seed function clojure.core.cache.wrapped Is used to signal that the cache should be... + soft-cache-factory function clojure.core.cache Returns a SoftReference cache. Cached values will... + soft-cache-factory function clojure.core.cache.wrapped Returns a SoftReference cache. Cached val... + SoftCache type clojure.core.cache + ++
+ ->TTLCacheQ function clojure.core.cache Positional factory function for class clojure.core... + through function clojure.core.cache The basic hit/miss logic for the cache system. Ex... + through function clojure.core.cache.wrapped The basic hit/miss logic for the cache sys... + through-cache function clojure.core.cache The basic hit/miss logic for the cache system. Li... + through-cache function clojure.core.cache.wrapped The basic hit/miss logic for the cache sys... + ttl-cache-factory function clojure.core.cache Returns a TTL cache with the cache and expiration-... + ttl-cache-factory function clojure.core.cache.wrapped Returns a TTL cache with the cache and exp... + TTLCacheQ type clojure.core.cache + ++
+ ++
+ ++
+ ++
+ ++
+ ++
+ ++
+ ++
Eclipse Public License - v 1.0
- -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE -PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR -DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS -AGREEMENT.
- -1. DEFINITIONS
- -"Contribution" means:
- -a) in the case of the initial Contributor, the initial -code and documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program -originate from and are distributed by that particular Contributor. A -Contribution 'originates' from a Contributor if it was added to the -Program by such Contributor itself or anyone acting on such -Contributor's behalf. Contributions do not include additions to the -Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) -are not derivative works of the Program.
- -"Contributor" means any person or entity that distributes -the Program.
- -"Licensed Patents" mean patent claims licensable by a -Contributor which are necessarily infringed by the use or sale of its -Contribution alone or when combined with the Program.
- -"Program" means the Contributions distributed in accordance -with this Agreement.
- -"Recipient" means anyone who receives the Program under -this Agreement, including all Contributors.
- -2. GRANT OF RIGHTS
- -a) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free copyright license to reproduce, prepare derivative works -of, publicly display, publicly perform, distribute and sublicense the -Contribution of such Contributor, if any, and such derivative works, in -source code and object code form.
- -b) Subject to the terms of this Agreement, each -Contributor hereby grants Recipient a non-exclusive, worldwide, -royalty-free patent license under Licensed Patents to make, use, sell, -offer to sell, import and otherwise transfer the Contribution of such -Contributor, if any, in source code and object code form. This patent -license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered -by the Licensed Patents. The patent license shall not apply to any other -combinations which include the Contribution. No hardware per se is -licensed hereunder.
- -c) Recipient understands that although each Contributor -grants the licenses to its Contributions set forth herein, no assurances -are provided by any Contributor that the Program does not infringe the -patent or other intellectual property rights of any other entity. Each -Contributor disclaims any liability to Recipient for claims brought by -any other entity based on infringement of intellectual property rights -or otherwise. As a condition to exercising the rights and licenses -granted hereunder, each Recipient hereby assumes sole responsibility to -secure any other intellectual property rights needed, if any. For -example, if a third party patent license is required to allow Recipient -to distribute the Program, it is Recipient's responsibility to acquire -that license before distributing the Program.
- -d) Each Contributor represents that to its knowledge it -has sufficient copyright rights in its Contribution, if any, to grant -the copyright license set forth in this Agreement.
- -3. REQUIREMENTS
- -A Contributor may choose to distribute the Program in object code -form under its own license agreement, provided that:
- -a) it complies with the terms and conditions of this -Agreement; and
- -b) its license agreement:
- -i) effectively disclaims on behalf of all Contributors -all warranties and conditions, express and implied, including warranties -or conditions of title and non-infringement, and implied warranties or -conditions of merchantability and fitness for a particular purpose;
- -ii) effectively excludes on behalf of all Contributors -all liability for damages, including direct, indirect, special, -incidental and consequential damages, such as lost profits;
- -iii) states that any provisions which differ from this -Agreement are offered by that Contributor alone and not by any other -party; and
- -iv) states that source code for the Program is available -from such Contributor, and informs licensees how to obtain it in a -reasonable manner on or through a medium customarily used for software -exchange.
- -When the Program is made available in source code form:
- -a) it must be made available under this Agreement; and
- -b) a copy of this Agreement must be included with each -copy of the Program.
- -Contributors may not remove or alter any copyright notices contained -within the Program.
- -Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution.
- -4. COMMERCIAL DISTRIBUTION
- -Commercial distributors of software may accept certain -responsibilities with respect to end users, business partners and the -like. While this license is intended to facilitate the commercial use of -the Program, the Contributor who includes the Program in a commercial -product offering should do so in a manner which does not create -potential liability for other Contributors. Therefore, if a Contributor -includes the Program in a commercial product offering, such Contributor -("Commercial Contributor") hereby agrees to defend and -indemnify every other Contributor ("Indemnified Contributor") -against any losses, damages and costs (collectively "Losses") -arising from claims, lawsuits and other legal actions brought by a third -party against the Indemnified Contributor to the extent caused by the -acts or omissions of such Commercial Contributor in connection with its -distribution of the Program in a commercial product offering. The -obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In -order to qualify, an Indemnified Contributor must: a) promptly notify -the Commercial Contributor in writing of such claim, and b) allow the -Commercial Contributor to control, and cooperate with the Commercial -Contributor in, the defense and any related settlement negotiations. The -Indemnified Contributor may participate in any such claim at its own -expense.
- -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance -claims, or offers warranties related to Product X, those performance -claims and warranties are such Commercial Contributor's responsibility -alone. Under this section, the Commercial Contributor would have to -defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other -Contributor to pay any damages as a result, the Commercial Contributor -must pay those damages.
- -5. NO WARRANTY
- -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS -PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS -OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY -OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely -responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement , including but not limited to -the risks and costs of program errors, compliance with applicable laws, -damage to or loss of data, programs or equipment, and unavailability or -interruption of operations.
- -6. DISCLAIMER OF LIABILITY
- -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT -NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR -DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED -HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- -7. GENERAL
- -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable.
- -If Recipient institutes patent litigation against any entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the -Program itself (excluding combinations of the Program with other -software or hardware) infringes such Recipient's patent(s), then such -Recipient's rights granted under Section 2(b) shall terminate as of the -date such litigation is filed.
- -All Recipient's rights under this Agreement shall terminate if it -fails to comply with any of the material terms or conditions of this -Agreement and does not cure such failure in a reasonable period of time -after becoming aware of such noncompliance. If all Recipient's rights -under this Agreement terminate, Recipient agrees to cease use and -distribution of the Program as soon as reasonably practicable. However, -Recipient's obligations under this Agreement and any licenses granted by -Recipient relating to the Program shall continue and survive.
- -Everyone is permitted to copy and distribute copies of this -Agreement, but in order to avoid inconsistency the Agreement is -copyrighted and may only be modified in the following manner. The -Agreement Steward reserves the right to publish new versions (including -revisions) of this Agreement from time to time. No one other than the -Agreement Steward has the right to modify this Agreement. The Eclipse -Foundation is the initial Agreement Steward. The Eclipse Foundation may -assign the responsibility to serve as the Agreement Steward to a -suitable separate entity. Each new version of the Agreement will be -given a distinguishing version number. The Program (including -Contributions) may always be distributed subject to the version of the -Agreement under which it was received. In addition, after a new version -of the Agreement is published, Contributor may elect to distribute the -Program (including its Contributions) under the new version. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no -rights or licenses to the intellectual property of any Contributor under -this Agreement, whether expressly, by implication, estoppel or -otherwise. All rights in the Program not expressly granted under this -Agreement are reserved.
- -This Agreement is governed by the laws of the State of New York and -the intellectual property laws of the United States of America. No party -to this Agreement will bring a legal action under this Agreement more -than one year after the cause of action arose. Each party waives its -rights to a jury trial in any resulting litigation.
- - - - diff --git a/index-0.8.3-SNAPSHOT.clj b/index-0.8.3-SNAPSHOT.clj new file mode 100644 index 0000000..8d5a29a --- /dev/null +++ b/index-0.8.3-SNAPSHOT.clj @@ -0,0 +1,640 @@ +{:namespaces + ({:doc "A caching library for Clojure.", + :author "Fogus", + :name "clojure.core.cache", + :wiki-url "https://clojure.github.io/core.cache/index.html", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj"} + {:doc + "A higher level way to use clojure.core.cache that assumes the immutable\ncache is wrapped in an atom.\n\nThe API is (almost) the same as clojure.core.cache -- including the factory\nfunctions -- but instead of accepting immutable caches, the functions\nhere accept atoms containing those caches. The factory functions return\nnew atoms containing the newly created cache.\n\nIn addition, lookup-or-miss provides a safe, atomic way to retrieve a\nvalue from a cache or compute it if it is missing, without risking a\ncache stampede.", + :name "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache/index.html#clojure.core.cache.wrapped", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj"}), + :vars + ({:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->BasicCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L115", + :line 115, + :var-type "function", + :arglists ([cache]), + :doc + "Positional factory function for class clojure.core.cache.BasicCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->BasicCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->FIFOCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L173", + :line 173, + :var-type "function", + :arglists ([cache q limit]), + :doc + "Positional factory function for class clojure.core.cache.FIFOCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->FIFOCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->FnCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L135", + :line 135, + :var-type "function", + :arglists ([cache f]), + :doc + "Positional factory function for class clojure.core.cache.FnCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->FnCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->LIRSCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L437", + :line 437, + :var-type "function", + :arglists ([cache lruS lruQ tick limitS limitQ]), + :doc + "Positional factory function for class clojure.core.cache.LIRSCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->LIRSCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->LRUCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L214", + :line 214, + :var-type "function", + :arglists ([cache lru tick limit]), + :doc + "Positional factory function for class clojure.core.cache.LRUCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->LRUCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->LUCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L316", + :line 316, + :var-type "function", + :arglists ([cache lu limit]), + :doc + "Positional factory function for class clojure.core.cache.LUCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->LUCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->SoftCache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L522", + :line 522, + :var-type "function", + :arglists ([cache rcache rq]), + :doc + "Positional factory function for class clojure.core.cache.SoftCache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->SoftCache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "->TTLCacheQ", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L272", + :line 272, + :var-type "function", + :arglists ([cache ttl q gen ttl-ms]), + :doc + "Positional factory function for class clojure.core.cache.TTLCacheQ.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/->TTLCacheQ"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "basic-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L581", + :line 581, + :var-type "function", + :arglists ([base]), + :doc "Returns a pluggable basic cache initialied to `base`", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/basic-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "fifo-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L587", + :line 587, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns a FIFO cache with the cache and FIFO queue initialized to `base` --\nthe queue is filled as the values are pulled out of `base`. If the associative\nstructure can guarantee ordering, then the said ordering will define the\neventual eviction order. Otherwise, there are no guarantees for the eventual\neviction ordering.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the FIFO semantics apply (default is 32).\n\nIf the number of elements in `base` is greater than the limit then some items\nin `base` will be dropped from the resulting cache. If the associative\nstructure used as `base` can guarantee sorting, then the last `limit` elements\nwill be used as the cache seed values. Otherwise, there are no guarantees about\nthe elements in the resulting cache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/fifo-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "lirs-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L640", + :line 640, + :var-type "function", + :arglists + ([base + & + {:keys [s-history-limit q-history-limit], + :or {s-history-limit 32, q-history-limit 32}}]), + :doc + "Returns an LIRS cache with the S & R LRU lists set to the indicated\nlimits.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/lirs-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "lru-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L608", + :line 608, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns an LRU cache with the cache and usage-table initialied to `base` --\neach entry is initialized with the same usage value.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the LRU semantics apply (default is 32).", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/lru-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "lu-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L630", + :line 630, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns an LU cache with the cache and usage-table initialied to `base`.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the LU semantics apply (default is 32).", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/lu-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "soft-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L651", + :line 651, + :var-type "function", + :arglists ([base]), + :doc + "Returns a SoftReference cache. Cached values will be referred to with\nSoftReferences, allowing the values to be garbage collected when there is\nmemory pressure on the JVM.\n\nSoftCache is a mutable cache, since it is always based on a\nConcurrentHashMap.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/soft-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "through", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L44", + :line 44, + :var-type "function", + :arglists + ([cache item] [value-fn cache item] [wrap-fn value-fn cache item]), + :doc + "The basic hit/miss logic for the cache system. Expects a wrap function and\nvalue function. The wrap function takes the value function and the item in question\nand is expected to run the value function with the item whenever a cache\nmiss occurs. The intent is to hide any cache-specific cells from leaking\ninto the cache logic itelf.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/through"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "through-cache", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L57", + :line 57, + :var-type "function", + :arglists + ([cache item] [cache item value-fn] [cache item wrap-fn value-fn]), + :doc + "The basic hit/miss logic for the cache system. Like through but always has\nthe cache argument in the first position for easier use with swap! etc.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/through-cache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "ttl-cache-factory", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L619", + :line 619, + :var-type "function", + :arglists ([base & {ttl :ttl, :or {ttl 2000}}]), + :doc + "Returns a TTL cache with the cache and expiration-table initialized to `base` --\neach with the same time-to-live.\n\nThis function also allows an optional `:ttl` argument that defines the default\ntime in milliseconds that entries are allowed to reside in the cache.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/ttl-cache-factory"} + {:name "BasicCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/BasicCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "FIFOCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/FIFOCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "FnCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/FnCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "LIRSCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/LIRSCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "LRUCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/LRUCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "LUCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/LUCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "SoftCache", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/SoftCache", + :source-url nil, + :raw-source-url nil, + :file nil} + {:name "TTLCacheQ", + :var-type "type", + :namespace "clojure.core.cache", + :arglists nil, + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/TTLCacheQ", + :source-url nil, + :raw-source-url nil, + :file nil} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj", + :name "CacheProtocol", + :file "src/main/clojure/clojure/core/cache.clj", + :source-url + "https://github.com/clojure/core.cache/blob/5b8474a532a7f12ca1a1fbbf8f82a6f816c16b29/src/main/clojure/clojure/core/cache.clj#L20", + :line 20, + :var-type "protocol", + :arglists nil, + :doc "This is the protocol describing the basic cache capability.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/CacheProtocol"} + {:raw-source-url nil, + :name "evict", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache e]), + :doc "Removes an entry from the cache", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/evict"} + {:raw-source-url nil, + :name "has?", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache e]), + :doc "Checks if the cache contains a value associated with `e`", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/has?"} + {:raw-source-url nil, + :name "hit", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache e]), + :doc + "Is meant to be called if the cache is determined to contain a value\nassociated with `e`", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/hit"} + {:raw-source-url nil, + :name "lookup", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache e] [cache e not-found]), + :doc + "Retrieve the value associated with `e` if it exists, else `nil` in\nthe 2-arg case. Retrieve the value associated with `e` if it exists,\nelse `not-found` in the 3-arg case.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/lookup"} + {:raw-source-url nil, + :name "miss", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache e ret]), + :doc + "Is meant to be called if the cache is determined to **not** contain a\nvalue associated with `e`", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/miss"} + {:raw-source-url nil, + :name "seed", + :file nil, + :source-url nil, + :var-type "function", + :arglists ([cache base]), + :doc + "Is used to signal that the cache should be created with a seed.\nThe contract is that said cache should return an instance of its\nown type.", + :namespace "clojure.core.cache", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache/seed"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "basic-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L130", + :line 130, + :var-type "function", + :arglists ([base]), + :doc "Returns a pluggable basic cache initialied to `base`", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/basic-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "evict", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L95", + :line 95, + :var-type "function", + :arglists ([cache-atom e]), + :doc + "Removes an entry from the cache.\n\nReturns the updated cache from the atom.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/evict"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "fifo-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L135", + :line 135, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns a FIFO cache with the cache and FIFO queue initialized to `base` --\nthe queue is filled as the values are pulled out of `base`. If the associative\nstructure can guarantee ordering, then the said ordering will define the\neventual eviction order. Otherwise, there are no guarantees for the eventual\neviction ordering.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the FIFO semantics apply (default is 32).\n\nIf the number of elements in `base` is greater than the limit then some items\nin `base` will be dropped from the resulting cache. If the associative\nstructure used as `base` can guarantee sorting, then the last `limit` elements\nwill be used as the cache seed values. Otherwise, there are no guarantees about\nthe elements in the resulting cache.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/fifo-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "has?", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L72", + :line 72, + :var-type "function", + :arglists ([cache-atom e]), + :doc + "Checks if the cache contains a value associated with `e`.\n\nReads from the current version of the atom.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/has?"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "hit", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L79", + :line 79, + :var-type "function", + :arglists ([cache-atom e]), + :doc + "Is meant to be called if the cache is determined to contain a value\nassociated with `e`.\n\nReturns the updated cache from the atom. Provided for completeness.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/hit"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "lirs-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L179", + :line 179, + :var-type "function", + :arglists + ([base + & + {:keys [s-history-limit q-history-limit], + :or {s-history-limit 32, q-history-limit 32}}]), + :doc + "Returns an LIRS cache with the S & R LRU lists set to the indicated\nlimits.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/lirs-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "lookup", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L25", + :line 25, + :var-type "function", + :arglists ([cache-atom e] [cache-atom e not-found]), + :doc + "Retrieve the value associated with `e` if it exists, else `nil` in\nthe 2-arg case. Retrieve the value associated with `e` if it exists,\nelse `not-found` in the 3-arg case.\n\nReads from the current version of the atom.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/lookup"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "lookup-or-miss", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L38", + :line 38, + :var-type "function", + :arglists ([cache-atom e value-fn] [cache-atom e wrap-fn value-fn]), + :doc + "Retrieve the value associated with `e` if it exists, else compute the\nvalue (using value-fn, and optionally wrap-fn), update the cache for `e`\nand then perform the lookup again.\n\nvalue-fn (and wrap-fn) will only be called (at most) once even in the\ncase of retries, so there is no risk of cache stampede.\n\nSince lookup can cause invalidation in some caches (such as TTL), we\ntrap that case and retry (a maximum of ten times).", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/lookup-or-miss"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "lru-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L153", + :line 153, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns an LRU cache with the cache and usage-table initialied to `base` --\neach entry is initialized with the same usage value.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the LRU semantics apply (default is 32).", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/lru-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "lu-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L171", + :line 171, + :var-type "function", + :arglists ([base & {threshold :threshold, :or {threshold 32}}]), + :doc + "Returns an LU cache with the cache and usage-table initialied to `base`.\n\nThis function takes an optional `:threshold` argument that defines the maximum number\nof elements in the cache before the LU semantics apply (default is 32).", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/lu-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "miss", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L87", + :line 87, + :var-type "function", + :arglists ([cache-atom e ret]), + :doc + "Is meant to be called if the cache is determined to **not** contain a\nvalue associated with `e`.\n\nReturns the updated cache from the atom. Provided for completeness.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/miss"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "seed", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L102", + :line 102, + :var-type "function", + :arglists ([cache-atom base]), + :doc + "Is used to signal that the cache should be created with a seed.\nThe contract is that said cache should return an instance of its\nown type.\n\nReturns the updated cache from the atom. Provided for completeness.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/seed"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "soft-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L189", + :line 189, + :var-type "function", + :arglists ([base]), + :doc + "Returns a SoftReference cache. Cached values will be referred to with\nSoftReferences, allowing the values to be garbage collected when there is\nmemory pressure on the JVM.\n\nSoftCache is a mutable cache, since it is always based on a\nConcurrentHashMap.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/soft-cache-factory"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "through", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L111", + :line 111, + :var-type "function", + :arglists + ([cache-atom item] + [value-fn cache-atom item] + [wrap-fn value-fn cache-atom item]), + :doc + "The basic hit/miss logic for the cache system. Expects a wrap function and\nvalue function. The wrap function takes the value function and the item in question\nand is expected to run the value function with the item whenever a cache\nmiss occurs. The intent is to hide any cache-specific cells from leaking\ninto the cache logic itelf.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/through"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "through-cache", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L122", + :line 122, + :var-type "function", + :arglists + ([cache-atom item] + [cache-atom item value-fn] + [cache-atom item wrap-fn value-fn]), + :doc + "The basic hit/miss logic for the cache system. Like through but always has\nthe cache argument in the first position.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/through-cache"} + {:raw-source-url + "https://github.com/clojure/core.cache/raw/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj", + :name "ttl-cache-factory", + :file "src/main/clojure/clojure/core/cache/wrapped.clj", + :source-url + "https://github.com/clojure/core.cache/blob/68c317bad2706267a63d024fe3bb5aaf5c1b7b75/src/main/clojure/clojure/core/cache/wrapped.clj#L162", + :line 162, + :var-type "function", + :arglists ([base & {ttl :ttl, :or {ttl 2000}}]), + :doc + "Returns a TTL cache with the cache and expiration-table initialized to `base` --\neach with the same time-to-live.\n\nThis function also allows an optional `:ttl` argument that defines the default\ntime in milliseconds that entries are allowed to reside in the cache.", + :namespace "clojure.core.cache.wrapped", + :wiki-url + "https://clojure.github.io/core.cache//index.html#clojure.core.cache.wrapped/ttl-cache-factory"})} diff --git a/index.html b/index.html new file mode 100644 index 0000000..8235447 --- /dev/null +++ b/index.html @@ -0,0 +1,931 @@ + + + +A caching library for Clojure.+ + +
This is the protocol describing the basic cache capability.+ Known implementations: BasicCache, FIFOCache, FnCache, LIRSCache, LRUCache, LUCache, SoftCache, TTLCacheQ +
Usage: (evict cache e) ++
Removes an entry from the cache+ + + + +
Usage: (has? cache e) ++
Checks if the cache contains a value associated with `e`+ + + + +
Usage: (hit cache e) ++
Is meant to be called if the cache is determined to contain a value +associated with `e`+ + + + +
Usage: (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.+ + + + +
Usage: (miss cache e ret) ++
Is meant to be called if the cache is determined to **not** contain a +value associated with `e`+ + + + +
Usage: (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.+ + + + +
Usage: (->BasicCache cache) ++
Positional factory function for class clojure.core.cache.BasicCache.+ + + + Source +
Usage: (->FIFOCache cache q limit) ++
Positional factory function for class clojure.core.cache.FIFOCache.+ + + + Source +
Usage: (->FnCache cache f) ++
Positional factory function for class clojure.core.cache.FnCache.+ + + + Source +
Usage: (->LIRSCache cache lruS lruQ tick limitS limitQ) ++
Positional factory function for class clojure.core.cache.LIRSCache.+ + + + Source +
Usage: (->LRUCache cache lru tick limit) ++
Positional factory function for class clojure.core.cache.LRUCache.+ + + + Source +
Usage: (->LUCache cache lu limit) ++
Positional factory function for class clojure.core.cache.LUCache.+ + + + Source +
Usage: (->SoftCache cache rcache rq) ++
Positional factory function for class clojure.core.cache.SoftCache.+ + + + Source +
Usage: (->TTLCacheQ cache ttl q gen ttl-ms) ++
Positional factory function for class clojure.core.cache.TTLCacheQ.+ + + + Source +
Usage: (basic-cache-factory base) ++
Returns a pluggable basic cache initialized to `base`+ + + + Source +
Usage: (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.+ + + + Source +
Usage: (lirs-cache-factory base & {:keys [s-history-limit q-history-limit], :or {s-history-limit 32, q-history-limit 32}})
+
+ Returns an LIRS cache with the S & R LRU lists set to the indicated +limits.+ + + + Source +
Usage: (lru-cache-factory base & {threshold :threshold, :or {threshold 32}})
+
+ Returns an LRU cache with the cache and usage-table initialized 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).+ + + + Source +
Usage: (lu-cache-factory base & {threshold :threshold, :or {threshold 32}})
+
+ Returns an LU cache with the cache and usage-table initialized 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).+ + + + Source +
Usage: (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.+ + + + Source +
Usage: (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.+ + + + Source +
Usage: (through-cache cache item) + (through-cache cache item value-fn) + (through-cache cache item wrap-fn value-fn) ++
The basic hit/miss logic for the cache system. Like through but always has +the cache argument in the first position for easier use with swap! etc.+ + + + Source +
Usage: (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.+ + + + Source +
A higher level way to use clojure.core.cache that assumes the immutable +cache is wrapped in an atom. + +The API is (almost) the same as clojure.core.cache -- including the factory +functions -- but instead of accepting immutable caches, the functions +here accept atoms containing those caches. The factory functions return +new atoms containing the newly created cache. + +In addition, lookup-or-miss provides a safe, atomic way to retrieve a +value from a cache or compute it if it is missing, without risking a +cache stampede.+ + +
Usage: (basic-cache-factory base) ++
Returns a pluggable basic cache initialized to `base`+ + + + Source +
Usage: (evict cache-atom e) ++
Removes an entry from the cache. + +Returns the updated cache from the atom.+ + + + Source +
Usage: (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.+ + + + Source +
Usage: (has? cache-atom e) ++
Checks if the cache contains a value associated with `e`. + +Reads from the current version of the atom.+ + + + Source +
Usage: (hit cache-atom e) ++
Is meant to be called if the cache is determined to contain a value +associated with `e`. + +Returns the updated cache from the atom. Provided for completeness.+ + + + Source +
Usage: (lirs-cache-factory base & {:keys [s-history-limit q-history-limit], :or {s-history-limit 32, q-history-limit 32}})
+
+ Returns an LIRS cache with the S & R LRU lists set to the indicated +limits.+ + + + Source +
Usage: (lookup cache-atom e) + (lookup cache-atom 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. + +Reads from the current version of the atom.+ + + + Source +
Usage: (lookup-or-miss cache-atom e value-fn) + (lookup-or-miss cache-atom e wrap-fn value-fn) ++
Retrieve the value associated with `e` if it exists, else compute the +value (using value-fn, and optionally wrap-fn), update the cache for `e` +and then perform the lookup again. + +value-fn (and wrap-fn) will only be called (at most) once even in the +case of retries, so there is no risk of cache stampede. + +Since lookup can cause invalidation in some caches (such as TTL), we +trap that case and retry (a maximum of ten times).+ + + + Source +
Usage: (lru-cache-factory base & {threshold :threshold, :or {threshold 32}})
+
+ Returns an LRU cache with the cache and usage-table initialized 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).+ + + + Source +
Usage: (lu-cache-factory base & {threshold :threshold, :or {threshold 32}})
+
+ Returns an LU cache with the cache and usage-table initialized 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).+ + + + Source +
Usage: (miss cache-atom e ret) ++
Is meant to be called if the cache is determined to **not** contain a +value associated with `e`. + +Returns the updated cache from the atom. Provided for completeness.+ + + + Source +
Usage: (seed cache-atom 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. + +Returns the updated cache from the atom. Provided for completeness.+ + + + Source +
Usage: (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.+ + + + Source +
Usage: (through cache-atom item) + (through value-fn cache-atom item) + (through wrap-fn value-fn cache-atom 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.+ + + + Source +
Usage: (through-cache cache-atom item) + (through-cache cache-atom item value-fn) + (through-cache cache-atom item wrap-fn value-fn) ++
The basic hit/miss logic for the cache system. Like through but always has +the cache argument in the first position.+ + + + Source +
Usage: (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.+ + + + Source +