Changeset 753056
- Timestamp:
- 08/07/2013 04:10:07 PM (13 years ago)
- Location:
- nginx-helper/trunk
- Files:
-
- 3 edited
-
nginx-helper.php (modified) (1 diff)
-
purger.php (modified) (3 diffs)
-
readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nginx-helper/trunk/nginx-helper.php
r709330 r753056 2 2 /* 3 3 Plugin Name: Nginx Helper 4 Plugin URI: http://rtcamp.com/ 4 Plugin URI: http://rtcamp.com/nginx-helper/ 5 5 Description: An nginx helper that serves various functions. 6 Version: 1.7. 26 Version: 1.7.3 7 7 Author: rtCamp 8 8 Author URI: http://rtcamp.com 9 9 Requires at least: 3.0 10 Tested up to: 3. 510 Tested up to: 3.6 11 11 */ 12 12 namespace rtCamp\WP\Nginx { -
nginx-helper/trunk/purger.php
r702960 r753056 675 675 676 676 function true_purge_all(){ 677 $this->unlinkRecursive(RT_WP_NGINX_HELPER_CACHE_PATH );677 $this->unlinkRecursive(RT_WP_NGINX_HELPER_CACHE_PATH, false); 678 678 $this->log( "* * * * *" ); 679 679 $this->log( "* Purged Everything!" ); … … 681 681 } 682 682 683 function unlinkRecursive( $dir ) { 683 /** Source - http://stackoverflow.com/a/1360437/156336 **/ 684 685 function unlinkRecursive( $dir, $deleteRootToo ) { 684 686 if ( ! $dh = opendir( $dir ) ) { 685 687 return; … … 690 692 } 691 693 692 if ( ! unlink( $dir . '/' . $obj ) ) {694 if ( ! @unlink( $dir . '/' . $obj ) ) { 693 695 $this->unlinkRecursive( $dir . '/' . $obj, true ); 694 696 } 697 } 698 699 if ($deleteRootToo){ 700 rmdir($dir); 695 701 } 696 702 -
nginx-helper/trunk/readme.txt
r709330 r753056 3 3 Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks 4 4 Requires at least: 3.0 5 Tested up to: 3. 56 Stable tag: 1.7. 25 Tested up to: 3.6 6 Stable tag: 1.7.3 7 7 License: GPLv2 or later (of-course) 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 45 45 == Frequently Asked Questions == 46 46 47 **Important** - Please refer to [http://rtcamp.com/nginx-helper/faq](http://rtcamp.com/nginx-helper/faq) for uptodate FAQ's. 48 47 49 = FAQ - Installation/Comptability = 48 50 49 51 **Q. Will this work out of the box?** 50 52 51 No. You need to make some changes at the Nginx end. Please check **tutorial list** of [Description tab](http://wordpress.org/extend/plugins/nginx-helper/) 52 53 = FAQ - Nginx Map = 54 55 **Q. My multisite already uses `WPMU_ACCEL_REDIRECT`. Do I still need Nginx Map?** 56 57 Definitely. `WPMU_ACCEL_REDIRECT` reduces the load on PHP, but it still ask WordPress i.e. PHP/MySQL to do some work for static files e.g. images in your post. Nginx map lets nginx handle files on its own bypassing wordpress which gives you much better performance without using a CDN. 53 No. You need to make some changes at the Nginx end. Please check [tutorial list](http://rtcamp.com/wordpress-nginx/tutorials) 58 54 59 55 = FAQ - Nginx Fastcgi Cache Purge = 60 56 57 **Q. There's a 'purge all' button? Does it purge the whole site?** 58 59 Yes, it does. It physically empties the cache directory. It is set by default to `/var/run/nginx-cache/`. 60 61 If your cache directory is different, you can override this in your wp-config.php by adding 62 `define('RT_WP_NGINX_HELPER_CACHE_PATH','/var/run/nginx-cache/');` 63 64 Replace the path with your own. 65 61 66 **Q. Does it work for custom posts and taxonomies?** 67 62 68 Yes. It handles all post-types same way. 63 69 … … 87 93 Needless to say, this won't work, if you have a page or taxonomy called 'purge'. 88 94 89 **Q. There's a 'purge all' button? Does it purge the whole site?**90 91 Yes, it does. It physically empties the cache directory. It is set by default to `/var/run/nginx-cache/`.92 93 If your cache directory is different, you can override this in your wp-config.php by adding94 `define('RT_WP_NGINX_HELPER_CACHE_PATH','/var/run/nginx-cache/');`95 Replace the path with your own.96 95 97 96 = FAQ - Nginx Map = 97 98 **Q. My multisite already uses `WPMU_ACCEL_REDIRECT`. Do I still need Nginx Map?** 99 100 Definitely. `WPMU_ACCEL_REDIRECT` reduces the load on PHP, but it still ask WordPress i.e. PHP/MySQL to do some work for static files e.g. images in your post. Nginx map lets nginx handle files on its own bypassing wordpress which gives you much better performance without using a CDN. 98 101 99 102 **Q. I am using X plugin. Will it work on Nginx?** … … 113 116 114 117 == Changelog == 118 119 = 1.7.3 = 120 * Suppressed `unlink` related error-messages which can be safely ignored. 121 * Fixed a bug in purge-all option. 115 122 116 123 = 1.7.2 = … … 201 208 202 209 * Fixed duplicate entries generated for maps (Harmless, but doesn't look good!) 203 * Added timestamp html comments for cache verification, as described here: http://rtcamp.com/ tutorials/checklist-verify-wordpress-nginx-setup/210 * Added timestamp html comments for cache verification, as described here: http://rtcamp.com/wordpress-nginx/tutorials/checklist/ 204 211 205 212 = 1.3.3 = … … 218 225 219 226 * Improved Readme. 220 221 227 222 228 = 1.2 = … … 238 244 == Upgrade Notice == 239 245 240 = 1.7. 1=241 Added true purge all. Updated log and map file locations.246 = 1.7.3 = 247 Fixed true purge all.
Note: See TracChangeset
for help on using the changeset viewer.