0.4.6
View Source0.4.5
- chore: fix dialyzer
0.4.4
Bug Fixes
- refactor(counter): restrict
get/2to integer keys only and add bounds checking
0.4.3
Features
- feat(counter): add direct integer key indexing for deterministic slot access
0.4.2
Refactors
- refactor(counter): replace dynamic index map with deterministic hash-based indexing
0.4.1
New Adapters
Cache.PersistentTerm— new adapter backed by Erlang's:persistent_termfor extremely fast reads on rarely-written data such as configuration values. TTL is not supported; values persist until explicitly deleted.Cache.Counter— new atomic integer counter adapter backed by Erlang's:countersmodule. Provides lock-free increment/decrement operations viaput/4(values1or-1) and injectsincrement/1,2anddecrement/1,2into consumer modules throughuse Cache. Counter references and index maps are stored in:persistent_termfor zero-latency access from any process.
Strategy Adapters
Cache.Strategy— new behaviour for strategy-based adapters. Strategies compose over existing cache adapters and receive the underlying adapter module and its resolved opts so they can delegate operations appropriately. Adapter tuple format:adapter: {StrategyModule, UnderlyingAdapterOrConfig}.Cache.HashRing— consistent hash ring strategy usinglibring. Distributes keys across Erlang cluster nodes, forwarding operations to the owning node via:erpc(or a configurablerpc_module). The ring tracks node membership automatically viaHashRing.Managedwithmonitor_nodes: true. Includes read-repair: on a miss, previous ring snapshots (maintained byCache.HashRing.RingMonitor) are consulted to lazily migrate keys after rebalancing. Configurable options:ring_opts,node_weight,rpc_module,ring_history_size.Cache.MultiLayer— cascades reads and writes through multiple cache layers (e.g. ETS → Redis). Reads walk fastest → slowest with automatic backfill on a slower-layer hit. Writes go slowest → fastest to ensure durability. Supports an optionalon_fetchcallback on total miss and abackfill_ttlfor backfilled entries.Cache.RefreshAhead— proactively refreshes hot keys in the background before their TTL expires. Onget, if the value is within therefresh_beforewindow, the current value is returned immediately and an asyncTaskrefreshes it. Uses a per-cache ETS deduplication table and:globaldistributed locking to prevent redundant refreshes across nodes. Requires arefresh_before(ms) opt and arefresh/1callback oron_refreshopt.
Test Utilities
Cache.CaseTemplate— new ExUnit case template for applications with many test files. Define aCacheCasemodule once withdefault_cachesorsupervisors, thenuse MyApp.CacheCasein any test file to get automatic sandboxed cache setup. Supports per-file additional caches via:cachesand detects duplicate cache registrations at setup time.
Bug Fixes
- fix(ets): suppress
no_warn_undefinedfor OTP 26+ ETS functions on older OTP versions.
0.4.0
feat: add all ets/dets functions and ability for ets to rehydrate fix(con cache): allow concache to accept ets options
0.3.13
- fix: allow
Cache.ConCacheto acceptets_options(strict NimbleOptions validation + normalization) - feat: allow
Cache.ETSwrite_concurrency: :auto(OTP 25+)
0.3.12
- chore: fix warnings
0.3.11
- fix: redis
0.3.10
- fix: sandbox fix for smembers & sadd
0.3.9
- chore: add docs
- fix: set fix
0.3.8
- feat: add functions for ets & dets caches
0.3.7
- feat: add metrics module
0.3.6
- chore: fix child_spec type
0.3.5
- fix: Cache child spec for starting under a supervisor
0.3.4
add
get_or_create(key, (() -> {:ok, value} | {:error, reson}))to allow for create or updates
0.3.3
- use adapter options to allow for runtime options
- update sandbox hash_set_many behaviour to be consistent
- ensure dets does a mkdir_p at startup incase directory doesn't exist
0.3.2
- Update nimble options to 1.x
0.3.1
- add some more json sandboxing
- update redis to remove uri from command options
0.3.0
- add con_cache
- add ets cache
- fix hash opts for redis
0.2.1
- Adds support for application configuration and runtime options
0.2.0
- Stop redis connection errors from crashing the app
- Fix hash functions for
Cache.Redis - Support runtime cache config
- Support redis JSON
- Add
strategyoption toCache.Redisfor poolboy
0.1.1
- Expose
pipelineandcommandfunctions on redis adapters
0.1.0
- Initial Release