Description

This module allows sites using CloudFront as a CDN to send 'Invalidate' requests for nodes that have been updated when the site cache is cleared. This helps get around CloudFront's 3 active Invalidation request limit and to cut down on the total file invalidations (CF charges for > 3000). E.g., a node can be edited multiple times but only invalidated once when the cache is cleared.

It also supplies a form that can be used to manually specify URLs to be invalidated (e.g. a PDF file's content was changed but name didn't, and the like).

Optionally, a set of paths to always be refreshed can be defined. For example, if your front page shows node teasers and these need to be updated when a node's text changes, you could add to this list.

This module supplies a simple "status" page that shows the last 20 invalidation requests made to CloudFront. Recent requests will show up as 'in process' until Amazon has finished them.

It also has several methods for making sure the CDN is being used. These are:

  • Modifying the script and CSS URLs to not include a domain. This can be a problem is the page is cached while an editor is using the origin URL. The origin URL will be stored in the cached version and added to the CDN. Now all the Javascript and CSS are not being served by the CDN.
  • If the Advanced Agregation (advagg) module is used and the cdn host name is set in the configuration, the aggregation "context" will be forced to use the CDN hostname rather than the current host name. This helps ensure that aggregated CSS will pull from the CDN and not the origin server.
  • EXPERIMENTAL TEST FIRST! There is experimental support for using the expires module instead of just node update to trigger invalidate requests. This has not been fully tested, so use at your own risk.

CloudFront Refresh Links

Sandbox URL: https://www.drupal.org/sandbox/cgmonroe/2454357
Git Clone: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/cgmonroe/2454357.git cloudfront_refresh

Comments

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/httpgitdrupalorgsandboxcgmonroe2454357git

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.

shruti.sheth’s picture

Automated Review

Few bugs with Automation review.

FILE: .../drupal-7-pareview/pareview_temp/includes/cloudfront_refresh.node.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
10 | ERROR | [x] Expected "object" but found "stdClass" for parameter
| | type
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: ...drupal-7-pareview/pareview_temp/includes/cloudfront_refresh.pages.inc
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
194 | ERROR | [x] Closing parenthesis of array declaration must be on a
| | new line
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/cloudfront_refresh.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
227 | ERROR | [x] Doc comment long description must end with a full stop
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Manual Review

Individual user account
Yes: Follows
No duplication
Yes: Does not cause
Master Branch
Yes: Follows
Licensing
No: Does not follow
3rd party assets/code
Yes: Follows
README.txt/README.md
Yes: Follows
Code long/complex enough for review
Yes: Follows
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. Just a recommendation : t() string missing for 'title' in hook_permissions and hook_menu

This review uses the Project Application Review Template.

shruti.sheth’s picture

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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