{"id":13591492,"url":"https://github.com/clojure/core.memoize","last_synced_at":"2025-05-15T07:05:07.297Z","repository":{"id":1903693,"uuid":"2830637","full_name":"clojure/core.memoize","owner":"clojure","description":"A manipulable, pluggable, memoization framework for Clojure","archived":false,"fork":false,"pushed_at":"2024-10-04T22:47:11.000Z","size":290,"stargazers_count":270,"open_issues_count":0,"forks_count":38,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-11T15:57:10.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clojure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-22T20:16:34.000Z","updated_at":"2024-12-10T19:27:42.000Z","dependencies_parsed_at":"2024-01-16T21:56:06.017Z","dependency_job_id":"16e0da78-b814-47d9-bd18-165713e9a6d9","html_url":"https://github.com/clojure/core.memoize","commit_stats":{"total_commits":264,"total_committers":15,"mean_commits":17.6,"dds":"0.40909090909090906","last_synced_commit":"656eaecdc702d5d843351358f227120ffc15276f"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fcore.memoize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fcore.memoize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fcore.memoize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Fcore.memoize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojure","download_url":"https://codeload.github.com/clojure/core.memoize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292040,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:00:58.223Z","updated_at":"2025-05-15T07:05:02.285Z","avatar_url":"https://github.com/clojure.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"clojure.core.memoize\n========================================\n\n[core.memoize](https://github.com/clojure/core.memoize) is a Clojure contrib library providing the following features:\n\n* An underlying `PluggableMemoization` protocol that allows the use of customizable and swappable memoization caches that adhere to the synchronous `CacheProtocol` found in [core.cache](https://github.com/clojure/core.cache)\n\n* Memoization builders for implementations of common caching strategies, including:\n  - First-in-first-out (`clojure.core.memoize/fifo`)\n  - Least-recently-used (`clojure.core.memoize/lru`)\n  - Least-used (`clojure.core.memoize/lu`)\n  - Time-to-live (`clojure.core.memoize/ttl`)\n  - Naive cache (`memo`) that duplicates the functionality of Clojure's `memoize` function _but, unlike the built-in `memoize` function, ensures that in the case of concurrent calls with the same arguments, the memoized function is only invoked once_; in addition `memo` can use metadata from the memoized function to ignore certain arguments for the purpose of creating the cache key, e.g., allowing you to memoize `clojure.java.jdbc` functions where the first argument includes a (mutable) JDBC `Connection` object by specifying `:clojure.core.memoize/args-fn rest` in the metadata\n\n* Functions for manipulating the memoization cache of `core.memoize` backed functions\n\n\n\nReleases and Dependency Information\n========================================\n\nThis 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.\n\nLatest stable release: 1.1.266\n\n* [All Released Versions](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22core.memoize%22)\n* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~core.memoize~~~)\n\n[CLI/`deps.edn`](https://clojure.org/reference/deps_and_cli) dependency information:\n```clojure\norg.clojure/core.memoize {:mvn/version \"1.1.266\"}\n```\n\n[Leiningen](https://github.com/technomancy/leiningen) dependency information:\n\n    [org.clojure/core.memoize \"1.1.266\"]\n\n[Maven](https://maven.apache.org/) dependency information:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.clojure\u003c/groupId\u003e\n      \u003cartifactId\u003ecore.memoize\u003c/artifactId\u003e\n      \u003cversion\u003e1.1.266\u003c/version\u003e\n    \u003c/dependency\u003e\n\nDocumentation\n========================================\n\n* [Auto-generated API docs](https://clojure.github.io/core.memoize/)\n* [core.memoize on cljdoc.org](https://cljdoc.org/d/org.clojure/core.memoize/)\n\n\nExample Usage\n========================================\n\n```clojure\n    (ns my.cool.lib\n      (:require clojure.core.memoize))\n\n    (def id (clojure.core.memoize/lu\n\t          #(do (Thread/sleep 5000) (identity %))\n\t\t\t  :lu/threshold 3))\n\n    (id 42)\n    ; ... waits 5 seconds\n    ;=\u003e 42\n\n    (id 42)\n    ; instantly\n    ;=\u003e 42\n```\n\nRefer to docstrings in the `clojure.core.memoize` namespace for more information.\n\n\n\nDeveloper Information\n========================================\n\n* [GitHub project](https://github.com/clojure/core.memoize)\n* [Bug Tracker](https://clojure.atlassian.net/browse/CMEMOIZE)\n* [Continuous Integration](https://github.com/clojure/core.memoize/actions/workflows/test.yml)\n\n\nChange Log\n====================\n* Release 1.1.266 on 2024.02.19\n  * Update parent pom and deps\n  * Fixes [CMEMOIZE-30](https://clojure.atlassian.net/browse/CMEMOIZE-30) - typo in `ttl` docstring (j-mckitrick).\n* Release 1.0.257 on 2022.02.11\n  * Implement `IPending` for `RetryingDelay` for folks trying to do low-level availability tests on long-running memoized functions.\n* Release 1.0.253 on 2021.12.06\n  * Update `core.cache` to 1.0.225\n* Release 1.0.250 on 2021.08.02\n  * Clarify differences between `clojure.core/memoize` and `clojure.core.memoize/memo` functions [CMEMOIZE-25](https://clojure.atlassian.net/browse/CMEMOIZE-25).\n  * Update `core.cache` to 1.0.217.\n* Release 1.0.236 on 2020.04.13\n  * Switch to 1.0.x versioning [CMEMOIZE-29](https://clojure.atlassian.net/browse/CMEMOIZE-29).\n  * Update `core.cache` dependency version from 0.8.2 to 1.0.207.\n  * Fixes [CMEMOIZE-9](https://clojure.atlassian.net/browse/CMEMOIZE-9) - adds `memo-reset!` and deprecates 2-arity version of `memo-swap!`; adds 3+-arity version of `memo-swap!` to behave more like a `swap!` operation on the underlying cache\n* Release 0.8.2 on 2019.11.01 (to match core.cache again)\n  * Update `core.cache` dependency version from 0.7.2 to 0.8.2.\n  * Fixes [CMEMOIZE-28](https://clojure.atlassian.net/browse/CMEMOIZE-28) - provides `memoizer` as a more convenient way to build custom cached functions that may provide a seed hash map of arguments to return values. `build-memoizer` should be considered deprecated at this point.\n  * Fixes [CMEMOIZE-27](https://clojure.atlassian.net/browse/CMEMOIZE-27) - the `seed` function on `PluggableMemoization` now makes elements derefable (this case was missed when [CMEMOIZE-18](https://clojure.atlassian.net/browse/CMEMOIZE-18) was fixed)\n* Release 0.7.2 on 2019.06.13\n  * Fixes [CMEMOIZE-26](https://clojure.atlassian.net/browse/CMEMOIZE-26) - zero-arity function cache could not be replaced by `memo-swap!` (discovered by Teemu Kaukoranta)\n  * Updated core.cache dependency version from 0.7.1 to 0.7.2\n  * Updated test matrix locally to include Clojure 1.10.1, 1.11 master\n* Release 0.7.1 on 2018.03.02\n  * Fixes [CMEMOIZE-15](https://clojure.atlassian.net/browse/CMEMOIZE-15) - edge case where cache miss/lookup cross an eviction boundary (Ryan Fowler/Colin Jones)\n  * Updated core.cache dependency version from 0.7.0 to 0.7.1 (for TTLCacheQ bug fix)\n* Release 0.7.0 on 2018.03.01\n  * Fixes [CMEMOIZE-22](https://clojure.atlassian.net/browse/CMEMOIZE-22) - add `:clojure.core.memoize/args-fn` metadata support for memoizing functions which have one or more arguments that should not contribute to the cache key for calls\n  * Fixes [CMEMOIZE-20](https://clojure.atlassian.net/browse/CMEMOIZE-20) - add `lazy-snapshot` function\n  * Fixes [CMEMOIZE-18](https://clojure.atlassian.net/browse/CMEMOIZE-18) - automatically makes seed map values `deref`-able to match documentation and comply with core.memoize's world view\n  * Cleanup/improve/fix tests\n  * Add multi-version testing locally via Leiningen\n  * Jump to 0.7.0 to match core.cache since these two libraries are so closely in sync\n* Release 0.5.9 on 2016.03.28\n  * Updated core.cache dependency version from 0.6.4 to 0.6.5\n* Release 0.5.8 on 2015.11.06\n  * Fixes [CMEMOIZE-21](https://clojure.atlassian.net/browse/CMEMOIZE-21) - race condition in delay\n* Release 0.5.7 on 2015.01.12\n  * Fixes [CMEMOIZE-8](https://clojure.atlassian.net/browse/CMEMOIZE-8)\n  * Fixes [CMEMOIZE-13](https://clojure.atlassian.net/browse/CMEMOIZE-13)\n  * Updated core.cache dependency version from 0.6.3 to 0.6.4\n* Release 0.5.6 on 2013.06.28\n  * Added optional args to `memo-clear!`.\n  * Widened contract on factory functions to accept any callable.\n* Release 0.5.5 on 2013.06.14\n  * Deprecated `memo-*` APIs\n  * Adds new API of form `(cache-type function \u003cbase\u003e\u003c:cache-type/threshold int\u003e)`\n* Release 0.5.4 on 2013.06.03\n  * Fixes [CMEMOIZE-5](https://clojure.atlassian.net/browse/CMEMOIZE-5)\n  * Fixes [CMEMOIZE-2](https://clojure.atlassian.net/browse/CMEMOIZE-2)\n* Release 0.5.3 on 2013.03.18\n  * Works with core.cache v0.6.3\n* Release 0.5.2 on 2012.07.13\n  * Works with core.cache v0.6.1\n* Release 0.5.1 on 2011.12.13\n  * Removed SoftCache memoization\n* Release 0.5.0 on 2011.12.13\n  * Rolled in basis of Unk\n\n\nCopyright and License\n========================================\n\nCopyright (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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Fcore.memoize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojure%2Fcore.memoize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Fcore.memoize/lists"}