From 358ecd10f8ba4d9c4c4e93be8c9a566a4d977d32 Mon Sep 17 00:00:00 2001 From: Ido Barkan Date: Mon, 3 May 2021 08:25:56 +0300 Subject: [PATCH] 1.0.0 --- CHANGELOG.md | 5 +++++ README.md | 9 ++++----- project.clj | 4 ++-- src/cloffeine/loading_cache.clj | 5 +++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b103a4..d542b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +#### VERSION 1.0.0 +* Caffeine 3.0.2 +* Commitment on backwards compatibility +* Add async `loading-cache/refresh-all` + #### VERSION 0.1.9 * Clarify docstrings * Differentiate the construction of an AsyncLoadingCache that uses a CacheLoader diff --git a/README.md b/README.md index 060a9fa..cba8ef8 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,13 @@ Simple clojure wrapper over [`Caffeine`](https://github.com/ben-manes/caffeine). [![cljdoc badge](https://cljdoc.org/badge/com.appsflyer/cloffeine)](https://cljdoc.org/d/com.appsflyer/cloffeine/CURRENT) ## Installing -Add `[com.appsflyer/cloffeine "0.1.9"]` to your `project.clj` under `:dependencies`. +Add `[com.appsflyer/cloffeine "1.0.0"]` to your `project.clj` under `:dependencies`. ## [Checkout the docs](https://appsflyer.github.io/cloffeine/index.html) +## Stability +* This project is used in production already +* Since 1.0.0 th project will change the major semver iff Caffeine does so (currently at 3.x) ## Usage @@ -80,7 +83,3 @@ Add `[com.appsflyer/cloffeine "0.1.9"]` to your `project.clj` under `:dependenci (async-loading-cache/invalidate! alcache :key) (is (= "key" @(async-loading-cache/get alcache :key name))) ``` - -Todo: ------ -* Listeners diff --git a/project.clj b/project.clj index c3f78c9..051c89f 100644 --- a/project.clj +++ b/project.clj @@ -1,9 +1,9 @@ -(defproject com.appsflyer/cloffeine "0.2.0" +(defproject com.appsflyer/cloffeine "1.0.0" :description "A warpper over https://github.com/ben-manes/caffeine" :url "https://github.com/AppsFlyer/cloffeine" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[com.github.ben-manes.caffeine/caffeine "2.9.0"]] + :dependencies [[com.github.ben-manes.caffeine/caffeine "3.0.2"]] :plugins [[lein-codox "0.10.7"]] :codox {:output-path "codox" :source-uri "http://github.com/AppsFlyer/cloffeine/blob/{version}/{filepath}#L{line}" diff --git a/src/cloffeine/loading_cache.clj b/src/cloffeine/loading_cache.clj index 94fe723..1a19eb9 100644 --- a/src/cloffeine/loading_cache.clj +++ b/src/cloffeine/loading_cache.clj @@ -43,6 +43,11 @@ [^LoadingCache lcache k] (.refresh lcache k)) +(defn refresh-all + "Loads a new value for the keys, asynchronously." + [^LoadingCache lcache ks] + (.refreshAll lcache ks)) + (defn get-all "Returns a map of the values associated with the keys, creating or retrieving those values if necessary."