服务器重启后 ActiveSupport::Cache::MemoryStore 会发生什么?
What happens to ActiveSupport::Cache::MemoryStore when the server is restarted?
服务器重启后 ActiveSupport::Cache::MemoryStore 会发生什么情况?小块内存是否持久保存到磁盘?如果我理论上 运行 预加载缓存的 Rake 任务,那么该数据会在 Rake 任务和生产服务器启动之间保留吗?
ActiveSupport::Cache::MemoryStore 根本没有持久化。它甚至不在进程之间共享,因此如果您使用 Passenger、Unicorn 等托管,每个后端进程的缓存将完全分开。如果你想要一个可以持久保存到光盘的缓存,请查看 redis-rails.
服务器重启后 ActiveSupport::Cache::MemoryStore 会发生什么情况?小块内存是否持久保存到磁盘?如果我理论上 运行 预加载缓存的 Rake 任务,那么该数据会在 Rake 任务和生产服务器启动之间保留吗?
ActiveSupport::Cache::MemoryStore 根本没有持久化。它甚至不在进程之间共享,因此如果您使用 Passenger、Unicorn 等托管,每个后端进程的缓存将完全分开。如果你想要一个可以持久保存到光盘的缓存,请查看 redis-rails.