Files
fizzy/config/cache.yml
T
Mike Dalessio ca77968e55 Work around Rails' shard swapping lock in the Solid Cache config
Because solid cache started using shard swapping when given a
`database:` key in https://github.com/rails/solid_cache/pull/219, and
Rails doesn't distinguish which database is being swapped and which
was locked.

Hopefully I can make a change upstream that will enable swap locking
only for a specific databases. Until then, let's just use a slightly
more verbose configuration to work around it.
2025-03-12 07:53:31 -04:00

23 lines
466 B
YAML

default_options: &default_options
store_options:
# Cap age of oldest cache entry to fulfill retention policies
# max_age: <%= 60.days.to_i %>
max_size: <%= 256.megabytes %>
namespace: <%= Rails.env %>
default_connection: &default_connection
connects_to:
database:
writing: :cache
development:
<<: *default_connection
<<: *default_options
test:
<<: *default_options
production:
<<: *default_connection
<<: *default_options