99[ ![ Hex Version] ( https://img.shields.io/hexpm/v/nebulex_adapters_cachex.svg )] ( https://hex.pm/packages/nebulex_adapters_cachex )
1010[ ![ Docs] ( https://img.shields.io/badge/docs-hexpm-blue.svg )] ( https://hexdocs.pm/nebulex_adapters_cachex )
1111
12- See the [ docs] ( https://hexdocs.pm/nebulex_adapters_cachex/ )
12+ This adapter allows to use Cachex (a widely used and powerful cache in Elixir)
13+ via Nebulex, which means, you can use Nebulex as usual taking advantage of all
14+ its benefits (like the cache abstraction layer, distributed caching topologies,
15+ declarative caching annotations, and so on), and at the same time using Cachex
16+ as cache backend.
17+
18+ See the [ online documentation] ( https://hexdocs.pm/nebulex_adapters_cachex/ )
1319for more information.
1420
1521## Installation
@@ -19,7 +25,7 @@ Add `:nebulex_adapters_cachex` to your list of dependencies in `mix.exs`:
1925``` elixir
2026def deps do
2127 [
22- {:nebulex_adapters_cachex , " ~> 0. 1.0" }
28+ {:nebulex_adapters_cachex , " ~> 1.0" }
2329 ]
2430end
2531```
@@ -103,7 +109,8 @@ defp cachex_opts do
103109end
104110```
105111
106- > See [ Cachex.start_link/1] [ cachex_start_link ] for more information.
112+ > See [ Cachex.start_link/1] [ cachex_start_link ] for more information
113+ about options.
107114
108115[ cachex_start_link ] : https://hexdocs.pm/cachex/Cachex.html#start_link/1
109116
@@ -158,3 +165,76 @@ Redis; for all examples you can just replace `Nebulex.Adapters.Local` by
158165` Nebulex.Adapters.Cachex ` .
159166
160167[ nbx_redis_adapter ] : https://github.com/cabol/nebulex_redis_adapter
168+
169+ ## Testing
170+
171+ Since ` Nebulex.Adapters.Cachex ` uses the support modules and shared tests
172+ from ` Nebulex ` and by default its test folder is not included in the Hex
173+ dependency, the following steps are required for running the tests.
174+
175+ First of all, make sure you set the environment variable ` NEBULEX_PATH `
176+ to ` nebulex ` :
177+
178+ ```
179+ export NEBULEX_PATH=nebulex
180+ ```
181+
182+ Second, make sure you fetch ` :nebulex ` dependency directly from GtiHub
183+ by running:
184+
185+ ```
186+ mix nbx.setup
187+ ```
188+
189+ Third, fetch deps:
190+
191+ ```
192+ mix deps.get
193+ ```
194+
195+ Finally, you can run the tests:
196+
197+ ```
198+ mix test
199+ ```
200+
201+ Running tests with coverage:
202+
203+ ```
204+ mix coveralls.html
205+ ```
206+
207+ You will find the coverage report within ` cover/excoveralls.html ` .
208+
209+ ## Benchmarks
210+
211+ Benchmarks were added using [ benchee] ( https://github.com/PragTob/benchee ) , and
212+ they are located within the directory [ benchmarks] ( ./benchmarks ) .
213+
214+ To run the benchmarks:
215+
216+ ```
217+ MIX_ENV=test mix run benchmarks/benchmark.exs
218+ ```
219+
220+ ## Contributing
221+
222+ Contributions to Nebulex are very welcome and appreciated!
223+
224+ Use the [ issue tracker] ( https://github.com/cabol/nebulex_adapters_cachex/issues )
225+ for bug reports or feature requests. Open a
226+ [ pull request] ( https://github.com/cabol/nebulex_adapters_cachex/pulls )
227+ when you are ready to contribute.
228+
229+ When submitting a pull request you should not update the
230+ [ CHANGELOG.md] ( CHANGELOG.md ) , and also make sure you test your changes
231+ thoroughly, include unit tests alongside new or changed code.
232+
233+ Before to submit a PR it is highly recommended to run ` mix check ` and ensure
234+ all checks run successfully.
235+
236+ ## Copyright and License
237+
238+ Copyright (c) 2020, Carlos Bolaños.
239+
240+ Nebulex.Adapters.Cachex source code is licensed under the [ MIT License] ( LICENSE ) .
0 commit comments