Using Rails 3.1.1 and Herkou
I have 1,000 products in my application. All of them have a very slow controller, which is effectively solved by caching fragments. Although the data does not change very often, it should still expire (which I do by sweeping) periodically, in my case, once a week.
Now, after sweeping the cached views, I donβt want my users to create new fragments, trying to access the products one by one (it takes about 6-8 seconds on first boot, 2-3 seconds for caching load). I suppose I can do this with a kind of script that will load each page of the Product one at a time and thus make the server create these fragments.
I can imagine that this can be handled in three ways:
Run a script on my local machine that will try to access each URL using some kind of get-down command. Downside: Not very pretty and will affect visitor statistics in a way that I would not want.
Run the same type of script on the server after the cleaner, which will load each Product. How can I do this in this case?
Using the smart Rails command to do this automatically. Is there such an elegant team?
source share