Skip to content

Commit

Permalink
Update Nebulex
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed Feb 13, 2021
1 parent 76d2e4e commit 7a288c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
See the [online documentation](https://hexdocs.pm/nebulex_adapters_cachex/)
for more information.

**NOTE:** This library only provides support for Nebulex v2.0.0 onwards.

## Installation

Add `:nebulex_adapters_cachex` to your list of dependencies in `mix.exs`:
Expand Down Expand Up @@ -104,7 +106,7 @@ end
```

> See [Cachex.start_link/1][cachex_start_link] for more information
about options.
about the options.

[cachex_start_link]: https://hexdocs.pm/cachex/Cachex.html#start_link/1

Expand Down
11 changes: 3 additions & 8 deletions lib/nebulex/adapters/cachex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ defmodule Nebulex.Adapters.Cachex do
[Cachex]: http://hexdocs.pm/cachex/Cachex.html
This adapter allows to use Cachex (a widely used and powerful cache in Elixir)
via Nebulex, which means, you can use Nebulex as usual taking advantage of all
its benefits (e.g.: cache abstraction layer, distributed caching topologies,
declarative caching annotations, and so on), and at the same time using Cachex
as cache backend.
By means of this adapter, you can configure Cachex as the cache backend
and use it through the Nebulex API.
## Options
Expand Down Expand Up @@ -129,7 +126,7 @@ defmodule Nebulex.Adapters.Cachex do
> **NOTE:** You could also use [NebulexRedisAdapter][nbx_redis_adapter] for
L2, it would be matter of changing the adapter for the L2 and the
configuration for set up Redis adapter.
configuration to set up Redis adapter.
[nbx_redis_adapter]: https://github.com/cabol/nebulex_redis_adapter
Expand Down Expand Up @@ -383,8 +380,6 @@ defmodule Nebulex.Adapters.Cachex do
@impl true
def stats(%{name: name, stats: stats}) do
if stats do
# IO.puts "#=> Stats: #{inspect(Cachex.stats(name))}"

{meta, stats} =
name
|> Cachex.stats!()
Expand Down
2 changes: 1 addition & 1 deletion test/shared/queryable_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Nebulex.Adapters.Cachex.QueryableTest do
import Nebulex.CacheCase

deftests do
import Nebulex.CacheHelpers
import Nebulex.CacheCase

alias Cachex.Query

Expand Down

0 comments on commit 7a288c2

Please sign in to comment.