I am using the following to cache a slow loading page using memcached:
caches_action :complex_report, :expires_in => 1.day
The controller action is protected by Devise authentication.
The page currently gets cached the first time a user requests it. Subsequent request that day are then pulled from the cache.
The problem with this is that the initial request takes 20-30 seconds to load. Is it possible to populate the cache in advance by way of a scheduled task?
Any suggestions much appreciated.