Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
barkanido committed May 3, 2021
1 parent 8a54e6b commit 358ecd1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
5 changes: 5 additions & 0 deletions src/cloffeine/loading_cache.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 358ecd1

Please sign in to comment.