Skip to content

Commit

Permalink
[cabol#178] External cache-key references on cacheable decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed Nov 20, 2022
1 parent e01cc47 commit f7a91a8
Show file tree
Hide file tree
Showing 5 changed files with 1,296 additions and 1,046 deletions.
10 changes: 6 additions & 4 deletions lib/nebulex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ defmodule Nebulex do
Via the cache, we can put, get, update, delete and query existing entries.
A cache needs an adapter to communicate to the in-memory data store.
* `Nebulex.Caching` - decorators provide an elegant way of annotating
functions to be cached or evicted. By means of these decorators, it is
possible the implementation of cache usage patterns like **Read-through**,
**Write-through**, **Cache-as-SoR**, etc.
* `Nebulex.Caching` - Declarative annotation-based caching via
**`Nebulex.Caching.Decorators`**. Decorators provide n elegant way of
annotating functions to be cached or evicted. Caching decorators also
enable the usage and/or implementation of cache usage patterns like
**Read-through**, **Write-through**, **Cache-as-SoR**, etc.
See [Cache Usage Patters Guide](http://hexdocs.pm/nebulex/cache-usage-patterns.html).
In the following sections, we will provide an overview of those components and
how they interact with each other. Feel free to access their respective module
Expand Down
5 changes: 3 additions & 2 deletions lib/nebulex/cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ defmodule Nebulex.Cache do

@doc """
Returns the default key generator applied only when using
**"declarative annotation-based caching"** via `Nebulex.Caching`.
**"declarative annotation-based caching"** via `Nebulex.Caching.Decorators`.
Sometimes you may want to set a different key generator when using
declarative caching. By default, the key generator is set to
Expand All @@ -572,7 +572,8 @@ defmodule Nebulex.Cache do
use Nebulex.Cache, default_key_generator: MyKeyGenerator
See `Nebulex.Caching` and `Nebulex.Caching.KeyGenerator` for more information.
See `Nebulex.Caching.Decorators` and `Nebulex.Caching.KeyGenerator`
for more information.
"""
@callback __default_key_generator__ :: Nebulex.Caching.KeyGenerator.t()

Expand Down
Loading

0 comments on commit f7a91a8

Please sign in to comment.