Skip to content

Commit

Permalink
More caching doc updates [IMMUTANT-538]
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Mar 26, 2015
1 parent eec4492 commit 6af1f8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions caching/src/immutant/caching.clj
Expand Up @@ -106,9 +106,9 @@
cache that applies that codec as entries are written/read to/from
the passed cache. This is typically necessary only when non-clojure
clients are sharing the cache. It's required if you wish to store
nil keys or values. The following codecs are supported by
default: :edn, and :json, The latter requires an additional
dependency on `cheshire`."
nil keys or values. The provided codecs are `:edn` and `:json` (the
latter requires you to depend on `cheshire`), and you can also use
any other codecs you may have registered."
[cache codec]
(.withCodec (component)
cache
Expand Down
11 changes: 6 additions & 5 deletions docs/guides/caching.md
Expand Up @@ -231,11 +231,11 @@ to the cache.
### Encoding

Cache entries are not encoded by default, but may be decorated with a
codec using the [[with-codec]] function. Provided codecs include
`:edn`, `:json`, and `:fressian`, but the latter two require
additional dependencies: `cheshire` and `org.clojure/data.fressian`,
respectively. The codec will be automatically applied anytime an entry
is written/read to/from the cache.
codec using the [[with-codec]] function. The provided codecs are
`:edn` and `:json` (the latter requires you to depend on [cheshire]),
and you can also use any other codecs you may have registered. The
codec will be automatically applied anytime an entry is written/read
to/from the cache.

Encoding entries is typically necessary only when non-clojure clients
are sharing your cache. And if you wish to store nil keys or values, a
Expand Down Expand Up @@ -330,3 +330,4 @@ capabilities is to deploy your app to a [WildFly] cluster.
[core.memoize]: https://github.com/clojure/core.memoize
[memoization]: http://en.wikipedia.org/wiki/Memoization
[WildFly]: guide-wildfly.html
[cheshire]: https://github.com/dakrone/cheshire

0 comments on commit 6af1f8b

Please sign in to comment.