This module allows you to clear the cache remotely. This can be useful if you have multisite installation with multiple databases. Very simple and straight forward. Needed for a a big multisite install, no CLI access and trying to log in to over 20 websites can be a bit time consuming (especially with same cookie domain).
Now have got a simple local file that makes cURL requests to all required sites and all process takes a minute rather than 20.
Have searched for module with this functionality however did not find such a module thus wrote this one.
Link to project page:
https://drupal.org/sandbox/centas/2116669
Link to git:
http://drupalcode.org/sandbox/centas/2116669.git/tree/refs/heads/7.x-1.x
Git clone:
git clone http://git.drupal.org/sandbox/centas/2116669.git clear_cache_remotely
Drupal 7
Manual reviews of other projects
https://drupal.org/node/2122451#comment-8015021
https://drupal.org/node/2080721#comment-8015161
https://drupal.org/node/2137845#comment-8187121
Comments
Comment #1
centas commentedComment #2
oresh commentedComment #3
saitanay commentedHi Centas,
Similar Existing Modules
The project looks to be a good idea, as there is currently no out of the box way to clear caches without logging in / cli - as listed on https://drupal.org/node/42055
Coding / Formatting Standards
The code is clean and I could see no issues in it.
Allow IP whitelist by wildcard
One feature that I would like to see in the module configuration page is whitelisting IPs by wildcards - Ex: 106.51.161.* rather than individual IPs.
Too small for project application
Also I am afraid if this module will be eligible for a Project application - As the guideline #2.3 in Project application checklist ( https://drupal.org/node/1587704 ) says
I am afraid if this pretty small module with <90 lines of code and 4 functions might not be eligible for an application.
Best
Tanay
Comment #4
centas commentedFair point. Will take a look to see how can possibly make it a little more useful (think the wildcard white listing of IPs seems quite sensible).
Comment #5
centas commentedHave extended the module a little.
Added:
Comment #6
PA robot commentedWe 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.
Comment #7
saitanay commentedHi centas,
The module looks good now. I have a couple of small suggestions.
.
.
.
.
Best
Tanay
Comment #8
centas commentedI have done the points 1,2 and 3 as per https://drupal.org/node/2116697#comment-7991537
I am not too sure about point 4 though yet, would love to keep the module simple for now and if gets approved and used, see what other people would say. Not sure its worth creating a whole URLs generator as the module is quite straight forward.
Comment #9
centas commentedUnassigning it from myself to no one, probably should have done it before as it might look like it "needs work" as was assigned to author.
Comment #10
centas commentedAdded review bonus tag
Comment #10.0
centas commentedAdding review links
Comment #11
klausiRemoving review bonus tag, you have not done all manual reviews, you just posted 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.
Comment #12
klausiSorry for the delay. Make sure to review more project applications to complete your review bonus and this will get finished faster.
manual review:
But otherwise looks almost ready, the DOS could be considered a security issue, so this is a blocker right now.
Comment #13
centas commented@klausi, thanks for your review.
A very good point in regards to possible DoS attack bug, have added a check to see if the module secret key is set up, and if its not, terminate the script there and then.
Was debating on changing JSON string response to "You have not set you security key" but decided not to as in not to give away the information on why request has failed. Hope that makes sense.
Also, removed the @return from doc block.
P.S. Getting there with the reviews, hopefully will get into it at some point :)
Comment #14
idebr commentedHi Centas,
Great idea for a module! Some pointer before you release:
die(json_encode($result)), you can usereturn drupal_json_output($result). This will set the correct http reponse header.$ips_whitelistis not used in the default code path and is set explicitly later, so you don't have to initialize the variable here. You can safely remove this line.Comment #15
centas commented@idebr, thanks for your review and points, have implemented them all.
Instead of hook_enable() I went with hook_install(). That way the default secret key will not get overwritten in case the administrator disabled the module and then enabled it again, thus making all the external calls to clear cache invalid.
Comment #16
centas commentedComment #17
dan.ashdown commentedHi centas,
Useful module thanks for creating.
Some minor things:
Comment #18
centas commented@Dan.Ashdown
1. Not really sure bout this one, according to the guidelines should be pretty much left empty in my module case: https://drupal.org/node/542202#package ?
2. Removed
3. Removed
4. Done
Comment #19
dan.ashdown commented1) Ah, fair enough. Thanks for sharing the link too :)
Comment #20
klausiLooks good to me! Assigning to kscheirer as he might have time to take a final look at this.
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #21
klausino objections for more than a week, so ...
Thanks for your contribution, centas!
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.
Comment #22
centas commentedAwesome news! Thank for the final review, just in time for London Drupal sprint! :)