# clear_cache
# Drupal clear_cache
This is a Drupal 7 module.
This basic module Clears All Drupal Cache and adds a menu item on the main admin menu,to clear cache based on user permissions.
Simple module, not very complicated.
Similar projects are "UI Cache Clear", "CacheFlush", "Block Cache Alter" and "Cache Actions".

The major bonus for "Cache Clear" lies in its simplicity. The ability to flush all drupal cache is based on user permission.

Adds permissions for clearing Drupal cache.
Clearing caches is relatively harmless.
Sites may slow down while site cache rebuilds.
Note: Clear Cache does not clear web browser cache,
This will need to be cleared separately. :p.
Adds menu link titled "Clear Cache" on administrative toolbar.

Install Instructions:
1. Download and unzip clear_cache.
2. Drag "clear_cache" file to your "sites/all/modules" folder.
Can create a "contrib" folder inside "sites/all/modules".
3. Enable "clear_cache" module,find people "permissions" tab.
Enable clear_cache for the various user roles.
4. Do not enable "clear_cache" for anonymous users!
5. "Clear Cache" menu item will now be available (admin menu).
6. Refresh home page.

Link to project: https://www.drupal.org/sandbox/geforcegtx480/2504311

Git Command to clone project:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/geforcegtx480/2504311.git clear_cache

cd clear_cache

CommentFileSizeAuthor
#5 clear_cache.zip30.06 KBgeforcegtx480
clear_cache.zip27.7 KBgeforcegtx480
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geforcegtx480’s picture

Issue summary: View changes
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxgeforcegtx4802504311git

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.

kamescg’s picture

Hello geforcegrx480,

Good job on the simplicity, but I noticed there are several errors with the code format :)

First, comments should not be included after an opening bracket (or anywhere after a statement for that matter)

function clear_cache_menu() { // function to add "clear cache" menu - is not an acceptable format

You should move inline comments above statements so it doesn't throw an error - http://pareview.sh/pareview/httpgitdrupalorgsandboxgeforcegtx4802504311git

Also, comments in the beginning shouldn't exceed 80 characters. You can use http://tools.zenverse.net/word-wrap/ to help with that.

Good luck :)

Dragooon’s picture

Automated Review

As identified by pareview.sh:
Git errors:
Git default branch is not set, see the documentation on setting a default branch.

Review of the 7.x-1.x branch (commit 7408661):

* Remove "version" from the ./clear_cache.info file, it will be added by drupal.org packaging automatically.
* No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
* Formatting issues, see http://pareview.sh/pareview/httpgitdrupalorgsandboxgeforcegtx4802504311git for more details

Manual Review

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
Yes: Follows the guidelines for in-project documentation and/or the README Template.
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
  1. function clear_cache_menu() { // function to add "clear cache" menu is incorrect format. You can specify any function description within the docblock above the function name
  2. Inline comments shouldn't be used, you can move the comments before the line to better follow the guidelines
  3. You should move version info from clear_cache.info, Drupal's release process automatically adds it
geforcegtx480’s picture

Issue summary: View changes
FileSize
30.06 KB
geforcegtx480’s picture

Thanks for the review! :)
@kamescg and @dragoon I have corrected the http://pareview.sh/ errors and ran it a few times.
No errors were discovered after review.
Will be reviewing other projects for good karma when I get home :)

Thanks again. This is my very first module on Drupal community, so any review, improvements are welcome.
Whats the next step.. I'm assuming more reviews.

Thanks all

geforcegtx480’s picture

Status: Needs work » Needs review
ravi.khetri’s picture

Manual Review :

  1. This project is too short minimum 120 lines of code or atleast 5 functions is minimum.
gaurav.bajpai’s picture

Status: Needs review » Needs work

Automated Review

http://pareview.sh/pareview/httpgitdrupalorgsandboxgeforcegtx4802504311git Its clean.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: This feature already available in Administration menu.
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.
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
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. Too much small Module.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

klausi’s picture

Status: Needs work » Needs review

Module duplication is a problem, but it should not block an application. README improvements are also no blockers. Anything else that you found or should this be RTBC instead?

ajalan065’s picture

@ klausi, there are certainly no application blockers in the project. But it hardly contains 20 lines of code.
So my suggestion would be to give it Single Project Promotion instead of git vetted role.
Btw, we can surely move the project to RTBC.

ajalan065’s picture

Status: Needs review » Reviewed & tested by the community

Hi geforcegtx480,
There are absolutely no blockers in your project. So finally your project is being set to RTBC. Keep contributing to drupal.

@git admins, please look at my note in the previous comment. https://www.drupal.org/node/2513008#comment-10184640
and please leave a message if I am wrong or have misunderstood drupal norms.

apaderno’s picture

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

Thank you for your contribution!

I am going to update 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 more contributors chatting on IRC in #drupal-contribute. 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.

Thank you to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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