project page: https://www.drupal.org/sandbox/arunkumark/2643490

This module helps clear specific Boost cache pages (delete particular static boost cache pages) on Drupal events - Node create, Node edit/update, Node delete, Node comment create, Node comment edit/update and Node comment delete.

Boost module cache the pages as static HTML files. When a new node is created, edited or deleted, the only way to refresh the node pages and the associated pages built using views would be to flush all cache. This module, Boost cache clear, allows us to clear specific page caches. The functionality can be enabled for specific content types, and for specific paths.

For a large Drupal content site, this functionality gives a large performance benefit by just clearing required caches.

Configuration:

Provides an interface "Boost Cache Clear Settings" on all Content pages. Enabling the same automates boost cache clear on node add/edit/delete and comment add/edit/delete for this content type. To clear boost cache specify pages by using their paths, enter one path. The "*" character is a wild card.
Example paths are for blog module, blog content type include the pages that list blogs - blog/* and blog?page=* for query strings.

Configuration Steps:

Step 1: Enable this module(admin/modules)
Step 2: Enable Boost cache clear for content types
(admin/structure/types/manage/CONTENT_TYPE_MACHINE_NAME)
Example : admin/structure/types/manage/article
Step 3: Click "Boost cache Clear settings" tab on Right side tabs.
Step 4: Enable checkbox for clear boost cache of node to this content type.
Step 5: Additionally add the Drupal paths needs to clear cache when node
created or updated for this content type.

boost cache clear cck configure

Clear Individual Page Cache:

Over and above this to clear a specific paths, this module provide then interface to clear specific page caches independent any Drupal core events at SITE_URL /admin/config/system/boost-cache-clear

boost cache clear page

Boost Cache Cleaner does not work for anonymous user.

Dependencies - boost(https://www.drupal.org/project/boost)

Below are the core events when the boost cache clear flushes (delete the static pages) the associated boost cache.
Node insert, update and delete.
Comment insert, update and delete.

Module can be further extended to your custom needs by calling the function boost_cache_clear_by_url()

Syntax:

/**
  * @param $url valid drupal path.
  */
boost_cache_clear_by_url($url);

Note: The "*" character is a wild card.
Example paths are for blog module, blog content type include the pages that list blogs - blog/*
for home page '/'

Similar Modules:
Boost Cache Cleaner: Boost cache cleaner flush (delete all the static boost cache pages) when any update occurs in drupal core. Example node update, insert or delete. So we need to rebuild boost cache for all pages instead of clearing specific cache. It may cause performance level drawback.

Automated Review

http://pareview.sh/pareview/httpgitdrupalorgsandboxarunkumark2643490git

Manual reviews of other projects:

1) https://www.drupal.org/node/2601168#comment-10708684
2) https://www.drupal.org/node/2645742#comment-10826130
3) https://www.drupal.org/node/2660126#comment-10894492
4) https://www.drupal.org/node/2053373#comment-10894690
5)https://www.drupal.org/node/2673664#comment-10992267
6)https://www.drupal.org/node/2414107#comment-10992503
7)https://www.drupal.org/node/2567181#comment-10992583

Clone Repository

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/arunkumark/2643490.git boost_cache_clear

Comments

arunkumark created an issue. See original summary.

arunkumark’s picture

Title: Boost Cache Clear » [D7] Boost Cache Clear
PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2643506

Project 2: https://www.drupal.org/node/2640908

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Status: Needs review » Needs work

Git clone command for the sandbox is missing in the issue summary, please add it.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

arunkumark’s picture

Issue summary: View changes
arunkumark’s picture

Status: Needs work » Needs review
arunkumark’s picture

Issue summary: View changes
gaja_daran’s picture

Hi,
Manual Review:

1. Remove hook_uninstall function in .info file
2. Undefined $enable_bcc variable in module file line no 61. Need to define the variable.

arunkumark’s picture

Hi gaja_daran,

Thanks for your valuable review, I updated the code based on your review.

Thanks & Regards
Arunkumar

arunkumark’s picture

Priority: Critical » Normal
lhuria94’s picture

Hi @arunkumark

I just did a review of this module. Please fix the following:

  • Remove "version" from the ./boost_cache_clear.info file, it will be added by drupal.org packaging automatically.
  • Remove "project" from the ./boost_cache_clear.info file, it will be added by drupal.org packaging automatically.
  • Remove "datestamp" from the ./boost_cache_clear.info file, it will be added by drupal.org packaging automatically.

Thanks

lhuria94’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

That was already reported by the automated review tool, please do a real manual review.

lhuria94’s picture

Oh I did not see that. Will do.
I believe the bot only mentioned "Git clone command for the sandbox is missing" issue which @arunkumark has fixed. That's why I did mentioned the pareview report.

arunkumark’s picture

Hi lhuria94,

Thanks for your valuable review. I changed the info file based on your review.

@klausi thanks for support.

Thanks & Regards
Arunkumar K
(https://www.drupal.org/u/arunkumark)

arunkumark’s picture

Issue summary: View changes
arunkumark’s picture

Priority: Normal » Critical
c.hoyer’s picture

Hi. I wanted to test your module, but I am just not getting the tab menu on my content types.

I am getting the configuration menu /admin/config/system/boost-cache-clear

I of course cleared the cache. Am I missing something?

arunkumark’s picture

Issue summary: View changes
StatusFileSize
new40.1 KB
arunkumark’s picture

Hi c.hoyer,
Thanks for reviewing my Module.

Its working properly. Can you make sure that to configure for content type as per following steps,

Step 1: Enable this module(admin/modules)
Step 2: Enable content types to clear automated boost cache clear when node create/update(admin/structure/types/manage/CONTENT_TYPE_MACHINE_NAME)
Example : admin/structure/types/manage/article, admin/structure/types/manage/page, etc.,
Step 3: In this page you can able to see a "Boost cache Clear settings" tab on Right side tabs.
Step 4: Enable the check-box for enable Boost cache clear for this content type and specify List of pages you want to clear the when node is created or Updated for this content type.

Thanks and Regards
Arunkumar K

anishnirmal’s picture

Hi,
File: boost_cache_clear.module
Line number: 160
function boost_cache_clear_by_url() clears all the cached html files for '*' case. This case works fine

/* line 166 */
$end_char = explode("/", $url);

Above code you are splitting the url by'/'. But boost will change the query string value by '_'. So you cant explode by '/'. However this code wont work for sub page caches. That is navigation to inner pages using pager.

For Ex: baseurl/blogs?page=10
Boost will convert as blogs_page=10.html, hence this wont get cleared.
Try to fix it thinking of some pattern matching

arvind.kinja’s picture

Hi,
It should have some validation criteria. When I enter # then it clear cache for home page. Also its not working for nodepages.
Regards
Arvind

anishnirmal’s picture

Status: Needs review » Needs work
arunkumark’s picture

Issue summary: View changes
StatusFileSize
new47.36 KB
arunkumark’s picture

Hi Anishnirmal,

Thanks for Reviewing my Project as per your suggestion Query parameterized URL(Like pagination ?page=1) can be define in Boost cache clear Configuration using Wild card(Ex: URL?page=*) or directly its URL(Ex: URL?page=1)

Example:
blogs?page=*

Thanks and Regards
Arunkumar K

arunkumark’s picture

Status: Needs work » Needs review
StatusFileSize
new62.61 KB

Hi arvind.kinja,

Thanks for Reviewing my Project, Proper validations introduced as per #22 comment.

Also you mentioned for node pages it won't clear. You must give URL alias path of the particular node instead of node/NID.

Thanks & Regards
Arunkumar K

klausi’s picture

Issue summary: View changes
Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not done all manual reviews, you just repeated the output of an automated review tool. Make sure to read through the source code of the other projects, as requested on the review bonus page.

arunkumark’s picture

Issue summary: View changes
arunkumark’s picture

Issue tags: +PAreview: review bonus

thanks klausi.

RavindraSingh’s picture

Good Practice -
There is a module https://www.drupal.org/project/boost_cache_cleaner which does similar what you qwant to provide. you can request to become a maintainer of that module to add the features you are adding here because you are also using same way what the module uses in the hooks event of the boost module.

klausi’s picture

Issue summary: View changes
klausi’s picture

Assigned: Unassigned » pushpinderchauhan
Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Git errors:

Manual review:

  1. project page: please add the differences to existing modules such as https://www.drupal.org/project/boost_cache_cleaner . Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. RavindraSingh has already offered you to collaborate on that, so please don't publish yet another module for the same purpose - it only makes it harder for users to find a solution.
  2. "; Information added by drupal.org packaging script on 2012-03-21": that line should be removed form the info file. drupal.org will add such a line for packaged downloads later.
  3. boost_cache_clear_schema(): what does CCK and CKK mean here? CCK is a Drupal 6 concept and does not exist in Drupal 7?
  4. boost_cache_clear_schema(): what is this table used for? Can you add a description to the table?
  5. you are using the term CCK throughout the module. That does not exist in Drupal, please use "content type" instead.
  6. "watchdog('cron', '%count files removed from boost cache...": you are not the cron module, you should use your own module identifier as first parameter to watchdog().
  7. boost_cache_clear_settings_form(): doc block is wrong, this is not hook_form(). See https://www.drupal.org/coding-standards/docs#forms

Otherwise looks good to me. We can still approve your account based on your skill writing this module, I would just ask you to not publish your module and collaborate with RavindraSingh to avoid duplication. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to er.pushpinderrana as he might have time to take a final look at this.

arunkumark’s picture

Issue summary: View changes
StatusFileSize
new64.19 KB
arunkumark’s picture

@klausi thanks,
as per comment #32 i have fixed all the points.

arunkumark’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
klausi’s picture

Assigned: pushpinderchauhan » Unassigned
Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, Arunkumar!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

arunkumark’s picture

@klausi thanks for your support.

klausi’s picture

@arunkumark: looks like you promoted your module instead of collaborating with RavindraSingh as we discussed? Why the unnecessary duplication?

arunkumark’s picture

@klausi, This module functionality can't adopt to RavindraSingh's Boost Cache Cleaner module. Am tried to Combiner these two modules but it Affects Key features of Existing module.

Am already Speaks with Ravindra regarding this. He happy with this module.

RavindraSingh’s picture

Congratulation @arunkumark your module is approved by community. Please keep continue with reviewing new project applications for contributing back to the community.

Thanks a lot @Klausi.

Status: Fixed » Closed (fixed)

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