Home

Awesome

clojure.core.memoize

core.memoize is a Clojure contrib library providing the following features:

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.1.266

CLI/deps.edn dependency information:

org.clojure/core.memoize {:mvn/version "1.1.266"}

Leiningen dependency information:

[org.clojure/core.memoize "1.1.266"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.memoize</artifactId>
  <version>1.1.266</version>
</dependency>

Documentation

Example Usage

    (ns my.cool.lib
      (:require clojure.core.memoize))

    (def id (clojure.core.memoize/lu
	          #(do (Thread/sleep 5000) (identity %))
			  :lu/threshold 3))

    (id 42)
    ; ... waits 5 seconds
    ;=> 42

    (id 42)
    ; instantly
    ;=> 42

Refer to docstrings in the clojure.core.memoize namespace for more information.

Developer Information

Change Log

Copyright and License

Copyright (c) Rich Hickey and Michael Fogus, 2023. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (https://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license. You must not remove this notice, or any other, from this software.