This module provides a new permission rebuild cache access. Roles with this permission assigned will see a admin toolbar button Rebuild Cache. Clicking it simply fires drupal_flush_all_caches(). That's it.

I'ld like to mind a similar (and rejected) Drupal core feature request: https://www.drupal.org/node/2870483 and I totally agree with @Berdir's statement:

that shouldn't be necessary in the first place. With cache tags, any change that an editor can make should automatically invalidate all relevant caches. Anything else is a bug IMHO.

Nevertheless in real world I found it necessary quite often to have other users than the ones with the administer site configuration permission being able to flush caches. Thinking especially of front-enders.

https://www.drupal.org/project/rebuild_cache_access

git clone --branch 8.x-1.x https://git.drupal.org/project/rebuild_cache_access.git

composer require drupal/rebuild_cache_access:dev-8.x-1.x

Manual reviews of other projects

Comments

leymannx created an issue. See original summary.

saivaishnavijupudi’s picture

StatusFileSize
new2.84 KB

I found the above coding standard errors.

saivaishnavijupudi’s picture

the patch for the coding standard errors, please review it.

norman.lol’s picture

Thanks a lot @saivaishnavijupudi! Patch reviewed and successfully applied and pushed.

norman.lol’s picture

Issue summary: View changes

Updated description git clone URL to https instead of user@git

norman.lol’s picture

Issue summary: View changes

Updated description and added some blank lines for readability

saivaishnavijupudi’s picture

Can you please give me credit for this patch @leymannx

norman.lol’s picture

@saivaishnavijupudi Absolutely, yes! But how?

norman.lol’s picture

Issue summary: View changes

Added review section.

norman.lol’s picture

Issue summary: View changes

Added review.

norman.lol’s picture

Issue summary: View changes

Updated review link.

norman.lol’s picture

Issue summary: View changes

Updated review link

norman.lol’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
norman.lol’s picture

Issue summary: View changes

Added review.

norman.lol’s picture

Issue summary: View changes

Added review.

norman.lol’s picture

Issue summary: View changes

Added review.

norman.lol’s picture

Issue summary: View changes

Added review.

saivaishnavijupudi’s picture

@leymannx please go to credit and committing section and check the checkbox beside my name.

norman.lol’s picture

@saivaishnavijupudi it already is. I guess this happens automatically.

Other thing I found something strange in your code sniffer output. As namespaced classes, interfaces and traits should not begin with a file doc comment. So the following 1 | ERROR | [x] Missing file doc comment are false positives:

FILE: ...ild_cache_access\src\Controller\RebuildCacheAccessController.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
 1 | ERROR | [x] End of line character is invalid; expected "\n" but
   |       |     found "\r\n"
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...htdocs\d8poc\modules\rebuild_cache_access\src\ToolbarHandler.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  1 | ERROR | [x] End of line character is invalid; expected "\n" but
    |       |     found "\r\n"
 37 | ERROR | [x] Expected 1 spaces after parameter type; 4 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
norman.lol’s picture

Priority: Normal » Major
norman.lol’s picture

Priority: Major » Critical
norman.lol’s picture

Tests added.

mattshoaf’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community

Took a look through the code and loaded it on a minimal install site.

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Does not follow the guidelines for in-project documentation and/or the README Template: missing section headings, see https://www.drupal.org/node/2181737, not a blocker since this module is straight forward enough.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
Coding style meets Drupal best practices.

avpaderno’s picture

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

Thank you for your contribution!

I am going to update your account so you can opt into security advisory coverage now.

These are some recommended readings to help with excellent maintainership:

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

Thank you, 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.

I thank all the dedicated reviewer(s) as well.

avpaderno’s picture

Status: Fixed » Closed (fixed)

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