mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-25 23:44:55 -04:00
The free Memcachier dev plan is timing out on every call in production (58 IO::TimeoutError in a 14 minute log window). Each request pays the 0.5s socket timeout and then renders uncached anyway, so the cache is currently pure overhead on a dyno that is already being OOM-killed. Memcached is now used only when USE_MEMCACHED=true and MEMCACHIER_SERVERS is present. Otherwise production uses a memory store capped at 32MB via RAILS_CACHE_SIZE_MB, so deploying restores real caching without the timeouts and without an addon upgrade. The memory store is per process, so homepage_stats gets an expires_in to bound staleness. It is the only fragment that relies on expire_fragment rather than a versioned cache key. Sessions are cookie-based and every other cached value is either keyed by cache_key_with_version or carries a TTL, so nothing depends on the cache being shared between processes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>