Skip to content

Commit

Permalink
enable redis cache store
Browse files Browse the repository at this point in the history
This updates production and the development environment to actually make
use of the Redis cache store.  Production adds the cache store config,
while development transitions from using the in-memory store over to the
external redis config.
  • Loading branch information
cflipse committed Aug 1, 2023
1 parent 0186c8a commit fa9c50d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :memory_store
# config.cache_store = :memory_store
config.cache_store = :redis_cache_store, {URL: ENV.fetch("REDIS_URL", "redis://localhost:6397/1")}
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
Expand Down
1 change: 1 addition & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
config.cache_store = :redis_cache_store, {URL: ENV.fetch("REDIS_URL", "redis://localhost:6397/1")}

# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
Expand Down

0 comments on commit fa9c50d

Please sign in to comment.