GNU bug report logs - #53765
[PATCH 00/17] Remove limitations on clojure-tools

Previous Next

Package: guix-patches;

Reported by: Reily Siegel <mail <at> reilysiegel.com>

Date: Fri, 4 Feb 2022 00:23:01 UTC

Severity: normal

Tags: patch

Full log


Message #17 received at 53765 <at> debbugs.gnu.org (full text, mbox):

From: Reily Siegel <mail <at> reilysiegel.com>
To: 53765 <at> debbugs.gnu.org
Subject: [PATCH 04/17] gnu: Add clojure-core-cache.
Date: Thu, 03 Feb 2022 19:24:35 -0500
* gnu/packages/clojure.scm (clojure-core-cache): New variable.
---
 gnu/packages/clojure.scm | 55 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index c4524c2abb..d390feff3d 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -259,6 +259,61 @@ (define-public clojure-algo-monads
     (home-page "https://github.com/clojure/algo.monads")
     (license license:epl1.0)))
 
+(define-public clojure-core-cache
+  (package
+    (name "clojure-core-cache")
+    (version "1.0.225")
+    (home-page "https://github.com/clojure/core.cache")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1dr1ply7ffdbd6bv4gygzmc0wx3q7zwzaaa1p93s28jkfp28276l"))))
+    (build-system clojure-build-system)
+    (arguments
+     '(#:source-dirs '("src/main/clojure")
+       #:test-dirs '("src/test/clojure")
+       #:doc-dirs '("doc")))
+    (propagated-inputs (list clojure-data-priority-map))
+    (synopsis "Caching library for Clojure implementing various cache strategies")
+    (description "@code{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 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 paper
+
+Factory functions for each existing cache type
+
+Caches are generally immutable and should be used in conjunction with
+Clojure's state management, such as atom.  SoftCache is the exception here,
+built on top of mutable Java collections, but it can be treated as an
+immutable cache as well.
+
+The @code{clojure.core.cache} namespace contains the immutable caches
+themselves.  The @code{clojure.core.cache.wrapped} namespace contains the same
+API operating on caches wrapped in atoms, which is the \"normal\" use in the
+wild.")
+    (license license:epl1.0)))
+
 (define-public clojure-core-match
   (let ((commit "1837ffbd4a150e8f3953b2d9ed5cf4a4ad3720a7")
         (revision "1")) ; this is the 1st commit buildable with clojure 1.9
-- 
2.34.0




This bug report was last modified 3 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.