Description
Haphazard is an ETS based plug for caching response body.
Haphazard alternatives and similar packages
Based on the "Caching" category.
Alternatively, view Haphazard alternatives based on common mentions on social networks and blogs.
-
cachex
A powerful caching library for Elixir with support for transactions, fallbacks and expirations -
request_cache_plug
Request caching for Phoenix & Absinthe (GraphQL), short circuiting even the JSON decoding/encoding -
elixir_locker
Locker is an Elixir wrapper for the locker Erlang library that provides some useful libraries that should make using locker a bit easier.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of Haphazard or a related project?
README
Haphazard [](LICENSE)
Haphazard is an ETS based plug for caching response body. Check the Online Documentation
Installation
Add haphazard
to your list of dependencies in mix.exs
:
def deps do
[{:haphazard, "~> 0.4.0"}]
end
put it in applications
applications: [:logger, ..., :haphazard]
Usage
Setup in your plug router:
plug Haphazard.Plug
Additional configurations (optional):
plug Haphazard.Plug,
methods: ~w(GET HEAD),
path: ~r/\/myroute/,
ttl: 60_000,
enabled: true
The additional configurations reflect the default values.
License
Source code is released under MIT License. Check [LICENSE](LICENSE) for more information.
*Note that all licence references and agreements mentioned in the Haphazard README section above
are relevant to that project's source code only.