rails/actionpack-page_caching

Update Cache per day.

minami-ken opened this issue · 6 comments

How could I regenerate&update cached pages per day?

@crazypioneer the docs go through an efficient way of busting the cache here

In terms of timing, as its something that is handled at the server level not the Rails app I would probably schedule this using a nightly CRON job.

Thank you for your kind.
As expected, CRON job....

@robzolkos
Excuse me.
Could you show me simple example?

I'm asking it on stackoverflow, too

https://stackoverflow.com/questions/64206647/rails-actionpack-page-caching-update-cached-pages-per-day

Thank you.
Not about CRON but about updating cache.
Should I run below command inside CRON JOB function?

tmp=public/cached_pages-$(date +%s)
mv public/cached_pages $tmp
rm -rf $tmp

I used this.
Thank you.

FileUtils.rm_rf('dir/to/remove')