开发者

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

开发者 https://www.devze.com 2023-02-09 00:30 出处:网络
I want to be able to put about 3k \"documen开发者_Go百科ts\" into memcached each time I restart my rails application, does anyone know how I could go about doing this?

I want to be able to put about 3k "documen开发者_Go百科ts" 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!


I would suggest that you add a new initializer file: config/initializers/memcached_data.rb And put the instructions needed to load the data in memcached there in that file.

0

精彩评论

暂无评论...
验证码 换一张
取 消