Jason
Jason

Reputation: 23395

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!

Upvotes: 0

Views: 454

Answers (1)

khelll
khelll

Reputation: 24010

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.

Upvotes: 1

Related Questions