Version Description
Download this release
Release Info
Developer | satollo |
Plugin | Hyper Cache |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.2.5
- advanced-cache.php +23 -1
- options.php +12 -9
- plugin.php +4 -1
- readme.txt +1 -1
advanced-cache.php
CHANGED
@@ -50,6 +50,12 @@ if (is_file($hyper_file))
|
|
50 |
die();
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
header('Content-Type: ' . $hyper_data['mime']);
|
54 |
|
55 |
// Send the cached html
|
@@ -96,7 +102,7 @@ function hyper_cache_callback($buffer)
|
|
96 |
$data['uri'] = $_SERVER['REQUEST_URI'];
|
97 |
$data['referer'] = $_SERVER['HTTP_REFERER'];
|
98 |
$data['time'] = time();
|
99 |
-
if ($hyper_redirect)
|
100 |
{
|
101 |
$data['location'] = $hyper_redirect;
|
102 |
}
|
@@ -134,8 +140,24 @@ function hyper_cache_callback($buffer)
|
|
134 |
{
|
135 |
$data['gz'] = gzencode($buffer);
|
136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
|
|
|
|
|
139 |
$file = fopen($hyper_file, 'w');
|
140 |
fwrite($file, serialize($data));
|
141 |
fclose($file);
|
50 |
die();
|
51 |
}
|
52 |
|
53 |
+
if ($hyper_data['status'] == 404)
|
54 |
+
{
|
55 |
+
header("HTTP/1.1 404 Not Found");
|
56 |
+
$hyper_data = unserialize(file_get_contents(ABSPATH . 'wp-content/hyper-cache/404.dat'));
|
57 |
+
}
|
58 |
+
|
59 |
header('Content-Type: ' . $hyper_data['mime']);
|
60 |
|
61 |
// Send the cached html
|
102 |
$data['uri'] = $_SERVER['REQUEST_URI'];
|
103 |
$data['referer'] = $_SERVER['HTTP_REFERER'];
|
104 |
$data['time'] = time();
|
105 |
+
if (false && $hyper_redirect)
|
106 |
{
|
107 |
$data['location'] = $hyper_redirect;
|
108 |
}
|
140 |
{
|
141 |
$data['gz'] = gzencode($buffer);
|
142 |
}
|
143 |
+
|
144 |
+
if (is_404())
|
145 |
+
{
|
146 |
+
if (!file_exists(ABSPATH . 'wp-content/hyper-cache/404.dat'))
|
147 |
+
{
|
148 |
+
$file = fopen(ABSPATH . 'wp-content/hyper-cache/404.dat', 'w');
|
149 |
+
fwrite($file, serialize($data));
|
150 |
+
fclose($file);
|
151 |
+
}
|
152 |
+
unset($data['html']);
|
153 |
+
unset($data['gz']);
|
154 |
+
$data['status'] = 404;
|
155 |
+
}
|
156 |
+
|
157 |
}
|
158 |
|
159 |
+
|
160 |
+
|
161 |
$file = fopen($hyper_file, 'w');
|
162 |
fwrite($file, serialize($data));
|
163 |
fclose($file);
|
options.php
CHANGED
@@ -1,25 +1,28 @@
|
|
1 |
<?php
|
2 |
-
//if (function_exists('load_plugin_textdomain')) {
|
3 |
-
// load_plugin_textdomain('hyper-cache', 'wp-content/plugins/hyper-cache');
|
4 |
-
//}
|
5 |
|
6 |
include(ABSPATH . 'wp-content/plugins/hyper-cache/en_US.php');
|
7 |
if (WPLANG) include(ABSPATH . 'wp-content/plugins/hyper-cache/' . WPLANG . '.php');
|
8 |
|
9 |
-
function hyper_request(
|
10 |
-
|
|
|
|
|
11 |
return $default;
|
12 |
}
|
13 |
-
|
|
|
|
|
14 |
return hyper_stripslashes($_POST[$name]);
|
15 |
}
|
16 |
-
else
|
|
|
17 |
return $_POST[$name];
|
18 |
}
|
19 |
}
|
20 |
|
21 |
-
function hyper_stripslashes($value)
|
22 |
-
|
|
|
23 |
return $value;
|
24 |
}
|
25 |
|
1 |
<?php
|
|
|
|
|
|
|
2 |
|
3 |
include(ABSPATH . 'wp-content/plugins/hyper-cache/en_US.php');
|
4 |
if (WPLANG) include(ABSPATH . 'wp-content/plugins/hyper-cache/' . WPLANG . '.php');
|
5 |
|
6 |
+
function hyper_request($name, $default=null)
|
7 |
+
{
|
8 |
+
if (!isset($_POST[$name]))
|
9 |
+
{
|
10 |
return $default;
|
11 |
}
|
12 |
+
|
13 |
+
if (get_magic_quotes_gpc())
|
14 |
+
{
|
15 |
return hyper_stripslashes($_POST[$name]);
|
16 |
}
|
17 |
+
else
|
18 |
+
{
|
19 |
return $_POST[$name];
|
20 |
}
|
21 |
}
|
22 |
|
23 |
+
function hyper_stripslashes($value)
|
24 |
+
{
|
25 |
+
$value = is_array($value)?array_map('hyper_stripslashes', $value):stripslashes($value);
|
26 |
return $value;
|
27 |
}
|
28 |
|
plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Hyper Cache
|
4 |
Plugin URI: http://www.satollo.com/english/wordpress/hyper-cache
|
5 |
Description: Hyper Cache is an extremely aggressive cache for WordPress.
|
6 |
-
Version: 1.2.
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.com
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -29,6 +29,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
29 |
---
|
30 |
Changelog
|
31 |
---
|
|
|
|
|
|
|
32 |
Version 1.1.1
|
33 |
- added an option to invalidate single post pages
|
34 |
|
3 |
Plugin Name: Hyper Cache
|
4 |
Plugin URI: http://www.satollo.com/english/wordpress/hyper-cache
|
5 |
Description: Hyper Cache is an extremely aggressive cache for WordPress.
|
6 |
+
Version: 1.2.5
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.com
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
29 |
---
|
30 |
Changelog
|
31 |
---
|
32 |
+
Version 1.2.x
|
33 |
+
- new version with many improvements, maybe not very safe
|
34 |
+
|
35 |
Version 1.1.1
|
36 |
- added an option to invalidate single post pages
|
37 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: cache,chaching
|
3 |
Requires at least: 2.1
|
4 |
Tested up to: 2.6.2
|
5 |
-
Stable tag: 1.2.
|
6 |
Donate link: http://www.satollo.com/english/donate
|
7 |
Contributors: satollo,momo360modena
|
8 |
|
2 |
Tags: cache,chaching
|
3 |
Requires at least: 2.1
|
4 |
Tested up to: 2.6.2
|
5 |
+
Stable tag: 1.2.5
|
6 |
Donate link: http://www.satollo.com/english/donate
|
7 |
Contributors: satollo,momo360modena
|
8 |
|