Skip to content

Releases: LegionIO/legion-cache

v1.4.2

14 Apr 00:39
7b0c595

Choose a tag to compare

Release v1.4.2

v1.4.1

06 Apr 19:28
d035368

Choose a tag to compare

Fixed

  • AsyncWriter TOCTOU race condition in enqueue (capture local executor reference)
  • Reconnector deadlock on stop (release mutex before thread.join)
  • Reconnector NoMethodError on successful reconnect (AtomicFixnum reset)
  • Missing require 'concurrent' in reconnector.rb
  • Redis cluster flush now passes auth/TLS credentials to per-node connections
  • Async writer drains before pool close on shutdown
  • Serialization applied to mget/mset_sync (was only on set_sync/get)
  • Binary encoding forced before serialization prefix checks

Added

  • Automatic failback to Local tier when shared cache is disabled or disconnected (configurable via failback_to_local: true)
  • mget/mset methods on Memory adapter for interface consistency
  • Public pool accessor on Legion::Cache (replaces direct @client access)
  • failed_count counter in AsyncWriter stats (async_failed in stats hash)
  • reconnect_shared! raising method for reconnector connect_block
  • End-to-end lifecycle integration test (shared fail -> local failback -> reconnect)

Changed

  • Helper and Cacheable use async: false for read-after-write consistency
  • AsyncWriter and Reconnector are tier-aware (settings_key: parameter, :cache_local for local tier)
  • Redis driver pool_size resolved from settings (was hardcoded to 20)
  • Pool checkout timeout separated from operation timeout (new pool_checkout_timeout setting)
  • Reconnector starts on any shared failure (even when local fallback succeeds)
  • setup guarded by enabled? check
  • State flags (@connected, @using_local, @using_memory) refactored to Concurrent::AtomicBoolean
  • Reconnector @stop_signal refactored to Concurrent::AtomicBoolean
  • RedisHash uses public pool accessor instead of instance_variable_get(:@client)

v1.3.22

03 Apr 16:12
ac4b197

Choose a tag to compare

Fixed

  • Default servers no longer pre-computed at require time with stale driver port; resolves Redis connecting to 127.0.0.1:11211 (memcached default) instead of user-configured host

v1.3.21

02 Apr 23:55
13a79c9

Choose a tag to compare

Fixed

  • Preserve fetch block behavior across shared, local, memory, and Redis cache paths; local-cache failures now fall back to the in-process cache and cached false values are retained correctly
  • Move shared adapter selection to runtime setup/client calls, register cache defaults through Legion::Cache::Settings, and normalize IPv4/hostname/IPv6 server addresses consistently
  • Restrict Redis hash/sorted-set helpers to the actual Redis backend and enforce documented TTL behavior for helper batch writes
  • Make the default bundle exec rspec suite hermetic by excluding service-backed integration specs unless RUN_INTEGRATION_SPECS=1

Changed

  • Uplift cache logging internals to Legion::Logging::Helper, replacing direct logger calls with helper-provided log usage across cache runtime modules
  • Route rescued cache adapter/helper/setup failures through handle_exception and expand runtime info/debug/error coverage for shared, local, memory, pool, and RedisHash flows
  • Require legion-logging >= 1.5.0 at runtime so helper exception handling is always available

v1.3.20

01 Apr 02:10
2886905

Choose a tag to compare

Fixed

  • Forward timeout setting to ::Redis.new — was silently using redis gem's 1.0s default instead of configured 5s, causing spurious timeouts on service mesh connections
  • Forward timeout to ::Redis.new in cluster mode path as well

Changed

  • Increase reconnect_attempts from 1 to [0, 0.5, 1] (shared) / [0, 0.25, 0.5] (local) — 3 retries with escalating backoff instead of 1 instant retry, improving resilience for service mesh and remote Redis connections

v1.3.19

31 Mar 23:36
8aef88c

Choose a tag to compare

Added

  • cache_mget / cache_mset (and local_cache_mget / local_cache_mset) on Helper mixin — delegates to Redis batch ops, falls back to sequential get/set on Memcached (closes #3)
  • cache_hset, cache_hgetall, cache_hdel, cache_zadd, cache_zrangebyscore, cache_zrem, cache_expire on Helper mixin — delegates to RedisHash with namespace prefixing; hash ops fall back to JSON-serialized Memcached values, sorted-set ops raise NotImplementedError, expire is a no-op on Memcached (closes #4)

v1.3.18

30 Mar 04:35
23f6335

Choose a tag to compare

Added

  • Layered TTL resolution in Helper (per-call → LEX override → Settings → FALLBACK_TTL)
  • cache_default_ttl / local_cache_default_ttl — LEX-overridable default TTL methods
  • cache_exist? / local_cache_exist? — key existence checks
  • cache_connected? / local_cache_connected? — connection status helpers
  • cache_pool_size / cache_pool_available — pool info (shared tier)
  • local_cache_pool_size / local_cache_pool_available — pool info (local tier)
  • phi: keyword argument on cache_set / local_cache_set for PHI TTL enforcement
  • default_ttl key in Settings.default and Settings.local (defaults to 60)

v1.3.17

25 Mar 20:54
a751f5f

Choose a tag to compare

Added

  • Legion::Cache::RedisHash module: Redis hash and sorted-set operations (hset, hgetall, hdel, zadd, zrangebyscore, zrem, expire) with redis_available? guard and safe defaults when Redis is not connected
  • Auto-required from legion/cache.rb alongside the existing Redis adapter

v1.3.16

25 Mar 05:47
cf628d0

Choose a tag to compare

Release v1.3.16

v1.3.15

25 Mar 02:22
1b8bf01

Choose a tag to compare

Added

  • PHI-aware TTL enforcement: Cache.set accepts phi: true keyword option; TTL is capped at cache.compliance.phi_max_ttl (default 3600s) when set
  • Legion::Cache.phi_max_ttl — reads cache.compliance.phi_max_ttl from settings with 3600s default
  • Legion::Cache.enforce_phi_ttl(ttl, phi:) — public helper for PHI TTL cap logic