# `Lotus.Cache.Cachex`
[🔗](https://github.com/typhoonworks/lotus/blob/v0.16.6/lib/lotus/cache/cachex.ex#L2)

A Cachex-based, local or distributed, in-memory cache adapter for Lotus.

This adapter requires the `Cachex` library. Please add `{:cachex, "~> 4.0"}` to your dependencies.

Example configuration in `config/config.exs`:

    config :lotus, :cache,
      adapter: Lotus.Cache.Cachex,
      cachex_opts: [limit: 1_000_000] # Optional Cachex options

See [Cachex documentation](https://hexdocs.pm/cachex/) for available options. By default,
Cachex will use a local-only routing strategy. To enable distributed caching, you can
choose your preferred router by [following the instructions in the Cachex docs](https://hexdocs.pm/cachex/cache-routers.html#default-routers).

# `decode`

# `encode`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
