I am using the following to cache a slow loading page using memcached:
caches_action :complex_report, :expires_in => 1.day
The controller ac
Here is an expansion on the previous cron based solution which uses curl's ability to store cookies so that you can auth in one step and then use the cookie again as an authenticated user in the next step. So if you put these lines in a script called "prepare_cache.sh"
rm /tmp/cookiejar
curl --request POST -d "login=" -d "password=" -c /tmp/cookiejar http://yourwebpages.url/login
curl --request GET -b -c /tmp/cookiejar http://yourwebpages.url/page_to_cache
rm /tmp/cookiejar
replacing the login and password parameters with ones which match the variables used in your login form and obviously the urls to call. I'm removing the cookiejar before to make sure there isn't a file there already and removing it at the end to make sure there isn't a cookie floating about with access levels it shouldn't have.
Then you can call this script with the cron job:
*/15 * * * * /home/myname/prepare_cache.sh > /dev/null 2>&1
And hopefully that should work. Seemed to work for me when I tried it.