WP Super Cache - Version 0.6.3

Version Description

Download this release

Release Info

Developer donncha
Plugin Icon 128x128 WP Super Cache
Version 0.6.3
Comparing to
See all releases

Code changes from version 0.6.2 to 0.6.3

Files changed (4) hide show
  1. Changelog.txt +33 -0
  2. readme.txt +5 -1
  3. wp-cache-phase2.php +4 -2
  4. wp-cache.php +5 -1
Changelog.txt CHANGED
@@ -1,3 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  2008-04-12 07:05 donncha
2
 
3
  * readme.txt, wp-cache.php: Bump version number and update
1
+ 2008-04-24 19:14 donncha
2
+
3
+ * readme.txt: Added changelog link
4
+ Added attachment_id mod_rewrite rule
5
+
6
+ 2008-04-24 19:11 donncha
7
+
8
+ * Changelog.txt: Updated Changelog
9
+
10
+ 2008-04-24 19:09 donncha
11
+
12
+ * readme.txt, wp-cache.php: Bump the version number
13
+
14
+ 2008-04-24 15:45 donncha
15
+
16
+ * wp-cache-phase2.php: Put "could not write" message in a HTML
17
+ comment at the end of the current page.
18
+
19
+ 2008-04-20 07:48 donncha
20
+
21
+ * wp-cache.php: Use blog charset for encoding.
22
+ Don't supercache attachment pages, props Callum
23
+
24
+ 2008-04-17 09:23 donncha
25
+
26
+ * wp-cache.php: Make sure files are served as UTF-8, props
27
+ tanguillo and nikolayb
28
+ http://wordpress.org/support/topic/169540?replies=3
29
+
30
+ 2008-04-12 07:06 donncha
31
+
32
+ * Changelog.txt: Updated changelog
33
+
34
  2008-04-12 07:05 donncha
35
 
36
  * readme.txt, wp-cache.php: Bump version number and update
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: donncha
3
  Tags: performance,caching,wp-cache
4
  Tested up to: 2.5
5
- Stable tag: 0.6.2
6
  Requires at least: 2.2
7
 
8
  A very fast caching engine for WordPress that produces static html files.
@@ -23,6 +23,8 @@ Super Cached html files will be server more quickly than PHP generated cached fi
23
 
24
  See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further information.
25
 
 
 
26
  == Installation ==
27
  1. You should have mod mime, mod rewrite and fancy permalinks enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use the slower WP-Cache part of the plugin.
28
  2. If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE define is deleted, and remove the files wp-content/wp-cache-config.php and wp-content/advanced-cache.php. These will be recreated when you install this plugin.
@@ -37,12 +39,14 @@ See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further
37
  `RewriteBase /`
38
 
39
  `RewriteCond %{QUERY_STRING} !.*s=.*`
 
40
  `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
41
  `RewriteCond %{HTTP:Accept-Encoding} gzip`
42
  `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f`
43
  `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]`
44
 
45
  `RewriteCond %{QUERY_STRING} !.*s=.*`
 
46
  `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
47
  `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f`
48
  `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]`
2
  Contributors: donncha
3
  Tags: performance,caching,wp-cache
4
  Tested up to: 2.5
5
+ Stable tag: 0.6.3
6
  Requires at least: 2.2
7
 
8
  A very fast caching engine for WordPress that produces static html files.
23
 
24
  See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further information.
25
 
26
+ The [changelog](http://svn.wp-plugins.org/wp-super-cache/trunk/Changelog.txt) is a good place to start if you want to know what has changed since you last downloaded the plugin.
27
+
28
  == Installation ==
29
  1. You should have mod mime, mod rewrite and fancy permalinks enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use the slower WP-Cache part of the plugin.
30
  2. If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE define is deleted, and remove the files wp-content/wp-cache-config.php and wp-content/advanced-cache.php. These will be recreated when you install this plugin.
39
  `RewriteBase /`
40
 
41
  `RewriteCond %{QUERY_STRING} !.*s=.*`
42
+ `RewriteCond %{QUERY_STRING} !.*attachment_id=.*`
43
  `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
44
  `RewriteCond %{HTTP:Accept-Encoding} gzip`
45
  `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f`
46
  `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]`
47
 
48
  `RewriteCond %{QUERY_STRING} !.*s=.*`
49
+ `RewriteCond %{QUERY_STRING} !.*attachment_id=.*`
50
  `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$`
51
  `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f`
52
  `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]`
wp-cache-phase2.php CHANGED
@@ -163,8 +163,10 @@ function wp_cache_ob_callback($buffer) {
163
  $super_cache_enabled = false;
164
 
165
  $fr = @fopen($cache_path . $cache_filename, 'w');
166
- if (!$fr)
167
- $buffer = "Couldn't write to: " . $cache_path . $cache_filename . "\n";
 
 
168
  if( $super_cache_enabled ) {
169
  $dir = str_replace( '//', '/', $dir );
170
  if( @is_dir( $dir ) == false )
163
  $super_cache_enabled = false;
164
 
165
  $fr = @fopen($cache_path . $cache_filename, 'w');
166
+ if (!$fr) {
167
+ $buffer .= "<!-- File not cached! Super Cache Couldn't write to: " . str_replace( ABSPATH, '', $cache_path ) . $cache_filename . " -->\n";
168
+ return $buffer;
169
+ }
170
  if( $super_cache_enabled ) {
171
  $dir = str_replace( '//', '/', $dir );
172
  if( @is_dir( $dir ) == false )
wp-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Super Cache
4
  Plugin URI: http://ocaoimh.ie/wp-super-cache/
5
  Description: Very fast caching module for WordPress. Once enabled, you must <a href="options-general.php?page=wp-super-cache/wp-cache.php">enable the cache</a>. Based on WP-Cache by <a href="http://mnm.uib.es/gallir/">Ricardo Galli Granada</a>.
6
- Version: 0.6.2
7
  Author: Donncha O Caoimh
8
  Author URI: http://ocaoimh.ie/
9
  */
@@ -234,13 +234,17 @@ function toggleLayer( whichLayer ) {
234
  $rules = "<IfModule mod_rewrite.c>\n";
235
  $rules .= "RewriteEngine On\n";
236
  $rules .= "RewriteBase $home_root\n"; // props Chris Messina
 
 
237
  $rules .= "RewriteCond %{QUERY_STRING} !.*s=.*\n";
 
238
  $rules .= "RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$\n";
239
  $rules .= "RewriteCond %{HTTP:Accept-Encoding} gzip\n";
240
  $rules .= "RewriteCond %{DOCUMENT_ROOT}{$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz -f\n";
241
  $rules .= "RewriteRule ^(.*) {$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz [L]\n\n";
242
 
243
  $rules .= "RewriteCond %{QUERY_STRING} !.*s=.*\n";
 
244
  $rules .= "RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$\n";
245
  $rules .= "RewriteCond %{DOCUMENT_ROOT}{$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html -f\n";
246
  $rules .= "RewriteRule ^(.*) {$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html [L]\n";
3
  Plugin Name: WP Super Cache
4
  Plugin URI: http://ocaoimh.ie/wp-super-cache/
5
  Description: Very fast caching module for WordPress. Once enabled, you must <a href="options-general.php?page=wp-super-cache/wp-cache.php">enable the cache</a>. Based on WP-Cache by <a href="http://mnm.uib.es/gallir/">Ricardo Galli Granada</a>.
6
+ Version: 0.6.3
7
  Author: Donncha O Caoimh
8
  Author URI: http://ocaoimh.ie/
9
  */
234
  $rules = "<IfModule mod_rewrite.c>\n";
235
  $rules .= "RewriteEngine On\n";
236
  $rules .= "RewriteBase $home_root\n"; // props Chris Messina
237
+ $charset = get_option('blog_charset') == '' ? 'UTF-8' : get_option('blog_charset');
238
+ $rules .= "AddDefaultCharset {$charset}\n";
239
  $rules .= "RewriteCond %{QUERY_STRING} !.*s=.*\n";
240
+ $rules .= "RewriteCond %{QUERY_STRING} !.*attachment_id=.*\n";
241
  $rules .= "RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$\n";
242
  $rules .= "RewriteCond %{HTTP:Accept-Encoding} gzip\n";
243
  $rules .= "RewriteCond %{DOCUMENT_ROOT}{$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz -f\n";
244
  $rules .= "RewriteRule ^(.*) {$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz [L]\n\n";
245
 
246
  $rules .= "RewriteCond %{QUERY_STRING} !.*s=.*\n";
247
+ $rules .= "RewriteCond %{QUERY_STRING} !.*attachment_id=.*\n";
248
  $rules .= "RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$\n";
249
  $rules .= "RewriteCond %{DOCUMENT_ROOT}{$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html -f\n";
250
  $rules .= "RewriteRule ^(.*) {$home_root}wp-content/cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html [L]\n";