簡體   English   中英

Rails + Memcache:我需要在服務器上安裝Memcache嗎?

[英]Rails + Memcache: Do I need to install memcache on my server?

嗨,我正在嘗試使用以下配置在我的Rails項目中設置內存緩存:

config.cache_store = :mem_cache_store, 'localhost', { :namespace => 'preview' }

我瀏覽了以下指南: http : //guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memcachestore,但其中只有一小段。 配置行是否足以使Memcache工作? 我以為我必須在服務器上安裝一些東西,但是找不到任何文檔/教程。 謝謝

是的,您需要安裝Memcached。 如果您使用Mac,我強烈建議您使用自制軟件( http://mxcl.github.io/homebrew/ ):

brew install memcached

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM