Popularity
5.5
Declining
Activity
0.0
Stable
36
12
12
Monthly Downloads: 1,552
Programming language: Elixir
License: Apache License 2.0
Tags:
Caching
Latest version: v0.1.3
lru_cache alternatives and similar packages
Based on the "Caching" category.
Alternatively, view lru_cache 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 - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
Do you think we are missing an alternative of lru_cache or a related project?
README
LruCache
Simple LRU Cache, implemented with ets
.
Installation
The package can be installed as:
- Add lru_cache to your list of dependencies in
mix.exs
:
def deps do
[{:lru_cache, "~> 0.1.0"}]
end
- Ensure lru_cache is started before your application:
def application do
[applications: [:lru_cache]]
end
Using
Typically you want to start the cache from a supervisor:
worker(LruCache, [:my_cache, 10])
Or starting it manually:
LruCache.start_link(:my_cache, 10)
The resulting process and ets table will be registered under this alias. Now you can use the cache as follows:
LruCache.put(:my_cache, "id", "value")
LruCache.get(:my_cache, "id")
LruCache.get(:my_cache, "id", touch = false)
LruCache.update(:my_cache, "id", "new_value", touch = false)
LruCache.delete(:my_cache, "id")