On the "Boost page cache status" Block, adding a button to del that page's cached file would be a nice feature. Also being able to delete the static page via an action would be nice as well. Thus using a rule, if the content is updated you can clear the cache.

CommentFileSizeAuthor
#10 boost-368366.patch1.43 KBmikeytown2

Comments

giorgio79’s picture

Title: Delete Cache Per Page » Delete Cache Per Page when node is updated or changed

I was just thinking along the same line.

Currently Boost removes cache file regardless if it was changed as per the time given in the cache lifetime.

It would be even more efficient if a page would only be updated when it is changed or new comment posted etc etc.

What do you think?

alex s’s picture

giorgio79, it is already implemented in boost_nodeapi and boost_comment hooks

giorgio79’s picture

wow, I may be behind a few versions then :D fantastic, let me check it.

mikeytown2’s picture

creating an action for boost_cache_expire() would allow one to clear that pages cache via rules, correct? What about clearing the cache for boosted views and other things that are not connected to a node, comment or user? using something like boost_cache_expire(boost_file_path($_GET['q'])). Trying to think of a way to generalize this.

wuf31’s picture

I think this should be accomplishedable with rules or actions..
However it won't be perfect IMO..
As an example, if a user adds a comment, then every page which have recent comments block may need to be refreshed, TRUE ?

mikeytown2’s picture

Title: Delete Cache Per Page when node is updated or changed » Boost Block: Delete/Cache Button

Thinking about this more... do this via AHAH or Form API? Add a button to the block that says something like "clear page from cache"; call boost_cache_expire(). When the page is live, the button says "cache this page"; call drupal_http_request() to get page as an anonymous user.

mikeytown2’s picture

Title: Boost Block: Delete/Cache Button » Boost Block - Button: Flush/Generate Page's Cache
mikeytown2’s picture

drupal_get_form() will load a form in a block. Creating an action will allow for people to get creative with this; VBO - generate cache, stuff like that. Next step is to write some code.

sebyoga’s picture

think we should stay in the simple, but effective. It is supposed to always know the URL of the current page. We are therefore able to empty the cache for this page. (use the $_SERVER['REQUEST_URI'])

In the case of adding a new page, no problem, the cache will activate the next visit to the page.

For the parameters, with the $_SERVER['REQUEST_URI'], the page domain.tld/cat/cat/node?toto=Good, i put in cache domain.tl/cat/cat/node.html => in .htaccess, you accept a GET parameters.

You wan't a block for control the cache ?

If the page is in cache, when you view the block if the page in cache is generated with no block ?

In cacheStatic, i use a javascript for fetch the toolbar, only if the user a permission.

mikeytown2’s picture

Status: Active » Needs work
StatusFileSize
new1.43 KB

More of a proof of concept, its quite crude but you can flush the pages cache.

mikeytown2’s picture

Flush the core page cache for the page as well

mikeytown2’s picture

Title: Boost Block - Button: Flush/Generate Page's Cache » Boost Block - Button: Flush Page's Cache
Status: Needs work » Fixed

Committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

doublejosh’s picture

This is a great feature. I really needed specific page flushes!

Any ideas about flushing pages that CANNOT be visited by a logged in user, for example: join pages (Auto Assign Role), etc.

mikeytown2’s picture

@doublejosh
Keep you eye out for this
http://drupal.org/node/622820#comment-2621052