HowTo autogenerate a cahced page that was deleted

Hi

I am using “caches_page :index” to cache a page.
I delete this file via a cron tab command every 1 hour.
However, right after the file is deleted the very next user experiences
a huge delay because the page is being generated.

Is there anyway to autogenerate the file before the very next user
requests the page? A unix or ruby solution would do.

thanks,
– nueromancer

nuero wrote:

Hi

I am using “caches_page :index” to cache a page.
I delete this file via a cron tab command every 1 hour.
However, right after the file is deleted the very next user experiences
a huge delay because the page is being generated.

Is there anyway to autogenerate the file before the very next user
requests the page? A unix or ruby solution would do.

thanks,
– nueromancer

Caching is done when a page is viewed. Get your cronjob to load the
page with something like:

curl http://yourdomain.com/my/cacheable/page

Alex W. wrote:

curl http://yourdomain.com/my/cacheable/page

thanks Alex
–nuero

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs