Code Monkey home page Code Monkey logo

Comments (6)

robzolkos avatar robzolkos commented on August 21, 2024

@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.

from actionpack-page_caching.

developer1031 avatar developer1031 commented on August 21, 2024

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

from actionpack-page_caching.

developer1031 avatar developer1031 commented on August 21, 2024

@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

from actionpack-page_caching.

robzolkos avatar robzolkos commented on August 21, 2024

This is a pretty good intruduction to cron https://www.google.com/amp/s/www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/amp/

from actionpack-page_caching.

developer1031 avatar developer1031 commented on August 21, 2024

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

from actionpack-page_caching.

developer1031 avatar developer1031 commented on August 21, 2024

I used this.
Thank you.

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

from actionpack-page_caching.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.