Friday 15 May 2015

Rails: Clear page cache without controller -


When I am modifying the model through the controller, I have set up clean workers to clean specific pages in the Page Cache.

How can I use a clean worker from the Railway Console (IRB)?

When I modify a model object in the console, either the sweeper will run automatically, or I need a simple way of manually running the sweeper for the modified object. Take a look at the expire_page for creating the path of the cache file from the cached file's URL;

One is the case, and then deleting that file. Unfortunately, cleanup workers are only in the controller layer because you need the url generation (i.e. url_for), so you need to manually generate the path of the cached page manually or the street level / identity level Drag to recognize.


No comments:

Post a Comment