質問

MemcachedをRailsのフラグメントキャッシュに使用する方法はありますか?

役に立ちましたか?

解決

environment.rbでfragment_cache_storeを設定できます

  ActionController::Base.cache_store = ActiveSupport::Cache::MemCacheStore.new()

http://api.rubyonrails.org/classes/ActionController/Caching .html#M000628

他のヒント

これをdevelopment.rbに追加すると、他のフラグメントと同様にフラグメントキャッシングを行う必要があります

config.action_controller.perform_caching = true
config.cache_classes = true
config.cache_store = :mem_cache_store
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top