Changeset 511632
- Timestamp:
- 02/28/2012 11:38:54 AM (14 years ago)
- Location:
- nginx-manager/trunk
- Files:
-
- 3 edited
-
nginx-manager.php (modified) (2 diffs)
-
nginxmNginx.php (modified) (6 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nginx-manager/trunk/nginx-manager.php
r484363 r511632 5 5 Description: Manage Nginx cache 6 6 Author: Simone Fumagalli & Marco Zanzottera 7 Version: 1.3.4. 17 Version: 1.3.4.2 8 8 Author URI: http://www.iliveinperego.com 9 9 Network: true … … 44 44 class nginxmLoader { 45 45 46 var $version = '1.3.4. 1'; // Plugin version46 var $version = '1.3.4.2'; // Plugin version 47 47 var $db_version = '1.3.4'; // DB version, change it to show the upgrade page 48 48 var $minium_WP = '3.0'; -
nginx-manager/trunk/nginxmNginx.php
r484363 r511632 26 26 global $nginxm; 27 27 28 $cache_ttl = 0; 29 30 // If it's an HTML document or a feed 31 if ( ( strpos($http_headers['Content-Type'], "text/html") !== false ) || ( strpos($http_headers['Content-Type'], "text/xml") !== false ) ) { 32 $cache_ttl = $nginxm->global_options['cache_ttl']; 33 } 28 $cache_ttl = $nginxm->global_options['cache_ttl']; 34 29 35 30 // If the user is logged in 36 foreach($_COOKIE as $key => $value){37 if ( preg_match($nginxm->global_options['cookie_regexp'], $key) ) {38 $cache_ttl = 0;39 }40 }41 31 foreach($_COOKIE as $key => $value){ 32 if ( preg_match($nginxm->global_options['cookie_regexp'], $key) ) { 33 $cache_ttl = 0; 34 } 35 } 36 42 37 // If the request is from a mobile device disable cache 43 38 if ( $nginxm->global_options['mobile_uncache'] ) { … … 47 42 } 48 43 } 49 50 $http_headers['X-Accel-Expires'] = $cache_ttl;51 52 if ($cache_ttl == 0) {53 54 $http_headers['X-NGINX-CACHED'] = "NO";55 56 } else {57 58 $http_headers['X-NGINX-CACHED'] = "YES - ".$cache_ttl." secs";59 $http_headers['X-NGINX-CACHED-AT'] = date('c');60 61 }62 63 return $http_headers;64 44 45 $http_headers['X-Accel-Expires'] = $cache_ttl; 46 47 if ($cache_ttl == 0) { 48 49 $http_headers['X-NGINX-CACHED'] = "NO"; 50 51 } else { 52 53 $http_headers['X-NGINX-CACHED'] = "YES - ".$cache_ttl." secs"; 54 $http_headers['X-NGINX-CACHED-AT'] = date('c'); 55 56 } 57 58 return $http_headers; 59 65 60 } 66 61 … … 323 318 } 324 319 } 325 }320 } 326 321 327 322 } … … 765 760 766 761 foreach( $_daily_archives as $_da ) { 767 $this->log( sprintf( "+ ".__( "Purging daily archive '%s/%s/%s'", "nginxm" ), $_da->year, $_da->month, $_da->dayofmonth ) );762 $this->log( sprintf( "+ ".__( "Purging daily archive '%s/%s/%s'", "nginxm" ), $_da->year, $_da->month, $_da->dayofmonth ) ); 768 763 $this->purgeUrl( get_day_link( $_da->year, $_da->month, $_da->dayofmonth ) ); 769 764 } … … 797 792 798 793 foreach( $_monthly_archives as $_ma ) { 799 $this->log( sprintf( "+ ".__( "Purging monthly archive '%s/%s'", "nginxm" ), $_ma->year, $_ma->month ) );794 $this->log( sprintf( "+ ".__( "Purging monthly archive '%s/%s'", "nginxm" ), $_ma->year, $_ma->month ) ); 800 795 $this->purgeUrl( get_month_link( $_ma->year, $_ma->month ) ); 801 796 } … … 829 824 830 825 foreach( $_yearly_archives as $_ya ) { 831 $this->log( sprintf( "+ ".__( "Purging yearly archive '%s'", "nginxm" ), $_ya->year ) );826 $this->log( sprintf( "+ ".__( "Purging yearly archive '%s'", "nginxm" ), $_ya->year ) ); 832 827 $this->purgeUrl( get_year_link( $_ya->year ) ); 833 828 } -
nginx-manager/trunk/readme.txt
r484363 r511632 3 3 Tags: cache, nginx, purge, performance 4 4 Requires at least: 3.0 5 Tested up to: 3.3 5 Tested up to: 3.3.1 6 6 Stable tag: trunk 7 7 … … 20 20 - You can add personal URLs to be purged when the post is modified 21 21 - Purge of future posts is handled with an external script. 22 - Integration with N EXTGen Gallery.22 - Integration with NextGEN Gallery plugin. 23 23 24 24 Credits : 25 25 26 - This plugin is based on the structure of famous plugin "NEXTGen Gallery"26 - This plugin is based on the structure of famous NextGEN Gallery plugin. 27 27 28 28 … … 31 31 *IMPORTANT* 32 32 33 If you are using a proxy you must modify the file wp-includes/class-http.php and delete lines 1346-1347 (WP 3.3) in function send_through_proxy():33 If you are using a proxy you must modify the file wp-includes/class-http.php and delete (or comment out) lines 1346-1347 (WP 3.3) in function send_through_proxy(): 34 34 35 35 if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] ) … … 63 63 == Changelog == 64 64 65 = 1.3.4.2 (2012 02 29) = 66 * BUG : Fixed cache for feed pages 67 65 68 = 1.3.4.1 (2012 01 04) = 66 * BUG : Fix mobile regex69 * BUG : Fixed mobile regex 67 70 68 71 = 1.3.4 (2011 12 27) =
Note: See TracChangeset
for help on using the changeset viewer.