Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

Full Site Cache for CloudFront

This plugin can invalidate the cache automatically if you are using full site CDN.

If you blog are using CloudFront on the main WordPress domain (e.g. http://www.example.com), and you want to cache HTML page for not logged in user. You could set a long "Default TTL" for these HTML pages if the cache could invalidate automatically.

Invalidation behaviors

  • Invalidate the whole cache when a post updated
  • Invalidate a post page if have any comment has changed on that page
  • Each invalidation has a minimum interval of 10 minutes

Requirements

  • PHP 5.4+
  • Wordpress 4.4+
  • A CloudFront account and AWS Access Key and Secret Key to access CloudFront distribution.

Recommendations

  • Offload CSS, JS and medias file to another domain with a different distribution, because this plugin will invalidate the whole cache when updating the post.
Author ZE3kr
Profile
Contributors ze3kr
Tags cache, CDN, cloudfront, html, optimize, pagespeed, performance, proxy, speed

First, you need to use CloudFront on your WordPress site.

Add the configuration code to your wp-config.php file above the line reading /* That’s all, stop editing! Happy blogging. */.

Example configuration:

$tlo_cf_id[1] = 'DISTRIBUTION_ID';
define( 'AWS_ACCESS_KEY_ID', '********************' );
define( 'AWS_SECRET_ACCESS_KEY', '****************************************' );
$wp_rich_edit = true; // CloudFront will remove user-agent header, so if you want to have Visual Editor, keep this line.

This plugin supports multisite, just replace 1 in the $tlo_cf_id[] to the blog id.

0.0.1

Published the first version

Share  
Download
Version 0.0.1

Requires WordPress version: 4.4 or higher

Compatible up to: 4.7.2

Last Updated 01 Feb 2017

Date Added: 31 Jan 2017

Evaluation
star1
star2
star3
star4
star5

0 stars
0 ratings
19 downloads

Compatibility

Not Enough Data

Reports:
Works: 0
Broken: 0