Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my site I have in the sidebar a block with recent comments.
Is there a way to flush all pages when a new comment is added? otherwise the block with recent comments is not updated in all boosted page.
Comments
Comment #1
SpleshkaI guess that you need to use SSI or ESI integration here. Flushing all page cache on every comment instert is a heavy operation. For this case even better disable page cache, then flush it every time when new comment was added.
Comment #2
Mentor.37 CreditAttribution: Mentor.37 commentedThis is a little site cached with boost, I have to approve every comment and I do this once a day.
I'd like to flush all pages when a comment is approved and when a node is added.
Is this possible?
I used Boost Expire but it deletes all boosted pages when a comment is added and not when a comment is approved.
#postedit
I edited the module Boost Expire and I solved the problem.
Here my version of Boost Expire.
Comment #3
SpleshkaYou may flush any cache on comment publish - 7.x-2.x branch of this module allows it.
Comment #4
Mentor.37 CreditAttribution: Mentor.37 commentedNo, I can not flush all pages when a comment is published, i tried.
Comment #5
SpleshkaCan you show me your config when you tried this?
Comment #6
Mentor.37 CreditAttribution: Mentor.37 commentedI selected all options in node settings and in comment setting but there was not the possibility to flush all bosted pages, only related node o comment page. I tried adding "*" in custom pages to flush but no luck.
Comment #7
SpleshkaTry to add "|wildcard" in custom page settings, that should work.
Comment #8
Mentor.37 CreditAttribution: Mentor.37 commentedOk, I will try this we, thank's.
Comment #8.0
Mentor.37 CreditAttribution: Mentor.37 commentedcorrection
Comment #9
SpleshkaPostpone the task, because of no progress.
Comment #10
Mentor.37 CreditAttribution: Mentor.37 commentedTried with no luck.
Comment #11
SpleshkaOkey, maybe it makes sense to provide setting like "Flush all cached pages". I think this is simple, don't you want to create a patch for that?