简体   繁体   中英

How can I populate memcached automatically everytime I restart my Rails app?

I want to be able to put about 3k "documents" into memcached each time I restart my rails application, does anyone know how I could go about doing this?

The documents are search result pointers and rarely change.

Thanks!

我建议您添加一个新的初始化程序文件: config/initializers/memcached_data.rb然后在该文件中放入将数据加载到memcached中所需的指令。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM