Changeset 1552133
- Timestamp:
- 12/11/2016 10:13:59 PM (9 years ago)
- Location:
- gator-cache/trunk
- Files:
-
- 3 edited
-
gator-cache.php (modified) (4 diffs)
-
lib/GatorCachePlugin.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gator-cache/trunk/gator-cache.php
r1520541 r1552133 2 2 /** 3 3 * @package Gator Cache 4 * @version 2.1. 34 * @version 2.1.4 5 5 */ 6 6 /* … … 12 12 Text Domain: gator-cache 13 13 Domain Path: /lang 14 Version: 2.1. 314 Version: 2.1.4 15 15 */ 16 16 class WpGatorCache … … 48 48 protected static $multiSiteData; 49 49 const PREFIX = 'gtr_cache'; 50 const VERSION = '2.1. 3';50 const VERSION = '2.1.4'; 51 51 const JP_MOBILE_MOD = 'minileven'; // JetPack mobile module slug 52 52 const SUPPORT_LINK = 'https://wordpress.org/support/plugin/gator-cache'; … … 249 249 public static function loadPurgeScripts() 250 250 { 251 wp_enqueue_style('dash-icons'); 251 252 wp_enqueue_script('gc-purge', ($pluginUrl = plugins_url(null, __FILE__)) . '/js/gator-cache-purge.min.js', array('jquery'), null, true); 252 253 wp_localize_script('gc-purge', 'gcData', array( -
gator-cache/trunk/lib/GatorCachePlugin.php
r1515890 r1552133 232 232 } 233 233 // make the object cache 234 @mkdir($ocPath = str_replace('/gator_cache', '/gator_cache_oc', $path), 0755);234 // @mkdir($ocPath = str_replace('/gator_cache', '/gator_cache_oc', $path), 0755); 235 235 //put htaccess here to prevent direct access 236 236 @file_put_contents($path . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\nAllow from env=redirect_gc_green\n"); 237 @file_put_contents($ocPath . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\n");237 // @file_put_contents($ocPath . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\n"); 238 238 } 239 239 //cache dir created or exists - get the group for subdir support or people that put blogs in the doc root … … 279 279 } 280 280 281 public function getInitDir($inRoot = false) 282 { 283 if (null === ($dir = GatorCache::getRequest()->getServer('DOCUMENT_ROOT')) 281 public function getInitDir($inRoot = false, $show = false) 282 { 283 if (defined('ABSPATH')) { 284 $dir = ABSPATH; 285 } 286 elseif (null === ($dir = GatorCache::getRequest()->getServer('DOCUMENT_ROOT')) 284 287 && null === ($dir = GatorCache::getRequest()->getServer('PWD'))) { 285 $dir = defined(ABSPATH) ? ABSPATH :realpath('./../../');288 $dir = realpath('./../../'); 286 289 } 287 290 return ($inRoot ? $dir : dirname($dir)) . DIRECTORY_SEPARATOR . 'gator_cache'; -
gator-cache/trunk/readme.txt
r1520541 r1552133 5 5 Requires at least: 3.8 6 6 Tested up to: 4.6.1 7 Stable tag: 2.1. 37 Stable tag: 2.1.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 54 54 Typically when a cache is refreshed, the cached file and it's contents are deleted. This is what GatorCache does when a post or page is updated. Then when a vistor visits that page, the cache is re-generated on the fly. This works well in most scenarios. However, if your pages are really slow when not cached, you can set GatorCache to "warm the cache". This simply means that when a post is updated and the content is removed from the cache, the post url will be pinged in the background in order to re-generate the cached content. This will prevent any visitors from getting non-cached content and slow-loading pages. Please note that when you purge the entire cache, and have cache warming enabled, that this will not regenerate the cache for the entire site. 55 55 56 == Changelog == 57 = 2.1.4 = 58 * Verify compatiblity with WordPress 4.7 59 * Use ABSPATH for installation directory when installed in document root 56 60 == Changelog == 57 61 = 2.1.3 =
Note: See TracChangeset
for help on using the changeset viewer.