Version Description
Download this release
Release Info
Developer | satollo |
Plugin | Hyper Cache |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.1.1
- advanced-cache.php +1 -1
- hyper-cache-de_DE.mo +0 -0
- hyper-cache-de_DE.po +10 -1
- hyper-cache-en_US.mo +0 -0
- hyper-cache-en_US.po +10 -1
- hyper-cache-fr_FR.mo +0 -0
- hyper-cache-fr_FR.po +10 -1
- hyper-cache-it_IT.mo +0 -0
- hyper-cache-it_IT.po +10 -1
- options.php +4 -1
- plugin.php +67 -14
- readme.txt +2 -2
advanced-cache.php
CHANGED
@@ -62,7 +62,7 @@ if ( is_file($hyper_file) ) {
|
|
62 |
header('Content-Type: ' . $hyper_data['mime']);
|
63 |
}
|
64 |
echo $hyper_data['html'];
|
65 |
-
echo '<!-- hyper cache -->';
|
66 |
flush();
|
67 |
die();
|
68 |
}
|
62 |
header('Content-Type: ' . $hyper_data['mime']);
|
63 |
}
|
64 |
echo $hyper_data['html'];
|
65 |
+
echo '<!-- hyper cache: ' . $hyper_cache_name . ' -->';
|
66 |
flush();
|
67 |
die();
|
68 |
}
|
hyper-cache-de_DE.mo
CHANGED
Binary file
|
hyper-cache-de_DE.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
-
"PO-Revision-Date: 2008-
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -55,3 +55,12 @@ msgstr "Do not expire on actions"
|
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
+
"PO-Revision-Date: 2008-10-13 22:50+0100\n"
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
58 |
+
msgid "invalidate_single_posts"
|
59 |
+
msgstr "Try to invalidate the single posts"
|
60 |
+
|
61 |
+
msgid "invalidate_single_posts_desc"
|
62 |
+
msgstr "Ivalidate only the web page of the modified posts, not all the blog web pages (only for actions on comments and post edit - posts publish and delete invalidate all the cache)"
|
63 |
+
|
64 |
+
msgid "compress_html"
|
65 |
+
msgstr "Compress the html cached"
|
66 |
+
|
hyper-cache-en_US.mo
CHANGED
Binary file
|
hyper-cache-en_US.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
-
"PO-Revision-Date: 2008-
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -55,3 +55,12 @@ msgstr "Do not expire on actions"
|
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
+
"PO-Revision-Date: 2008-10-13 22:50+0100\n"
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
58 |
+
msgid "invalidate_single_posts"
|
59 |
+
msgstr "Try to invalidate the single posts"
|
60 |
+
|
61 |
+
msgid "invalidate_single_posts_desc"
|
62 |
+
msgstr "Ivalidate only the web page of the modified posts, not all the blog web pages (only for actions on comments and post edit - posts publish and delete invalidate all the cache)"
|
63 |
+
|
64 |
+
msgid "compress_html"
|
65 |
+
msgstr "Compress the html cached"
|
66 |
+
|
hyper-cache-fr_FR.mo
CHANGED
Binary file
|
hyper-cache-fr_FR.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
-
"PO-Revision-Date: 2008-
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -55,3 +55,12 @@ msgstr "Do not expire on actions"
|
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
+
"PO-Revision-Date: 2008-10-13 22:50+0100\n"
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
55 |
msgid "not_expire_on_actions_desc"
|
56 |
msgstr "New comments, new posts, ..., rely only on cache timeout"
|
57 |
|
58 |
+
msgid "invalidate_single_posts"
|
59 |
+
msgstr "Try to invalidate the single posts"
|
60 |
+
|
61 |
+
msgid "invalidate_single_posts_desc"
|
62 |
+
msgstr "Ivalidate only the web page of the modified posts, not all the blog web pages (only for actions on comments and post edit - posts publish and delete invalidate all the cache)"
|
63 |
+
|
64 |
+
msgid "compress_html"
|
65 |
+
msgstr "Compress the html cached"
|
66 |
+
|
hyper-cache-it_IT.mo
CHANGED
Binary file
|
hyper-cache-it_IT.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
-
"PO-Revision-Date: 2008-
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -53,3 +53,12 @@ msgstr "Non invalidare sulle azioni"
|
|
53 |
msgid "not_expire_on_actions_desc"
|
54 |
msgstr "Nuovi commenti, nuovi articoli, ..., basati solo sul tempo di scadenza pagine"
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"Project-Id-Version: Hyper Cache\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-04-13 11:16+0100\n"
|
6 |
+
"PO-Revision-Date: 2008-10-13 22:50+0100\n"
|
7 |
"Last-Translator: Satollo <satollo@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
53 |
msgid "not_expire_on_actions_desc"
|
54 |
msgstr "Nuovi commenti, nuovi articoli, ..., basati solo sul tempo di scadenza pagine"
|
55 |
|
56 |
+
msgid "invalidate_single_posts"
|
57 |
+
msgstr "Try to invalidate the single posts"
|
58 |
+
|
59 |
+
msgid "invalidate_single_posts_desc"
|
60 |
+
msgstr "Ivalidate only the web page of the modified posts, not all the blog web pages (only for actions on comments and post edit - posts publish and delete invalidate all the cache)"
|
61 |
+
|
62 |
+
msgid "compress_html"
|
63 |
+
msgstr "Compress the html cached"
|
64 |
+
|
options.php
CHANGED
@@ -111,8 +111,11 @@ else
|
|
111 |
</tr>
|
112 |
|
113 |
<tr valign="top">
|
114 |
-
<?php hyper_field_checkbox('not_expire_on_actions', __('not_expire_on_actions', 'hyper-cache'), __('not_expire_on_actions_desc', 'hyper-cache')
|
115 |
</tr>
|
|
|
|
|
|
|
116 |
<tr valign="top">
|
117 |
<?php hyper_field_checkbox('compress', __('compress_html', 'hyper-cache')); ?>
|
118 |
</tr>
|
111 |
</tr>
|
112 |
|
113 |
<tr valign="top">
|
114 |
+
<?php hyper_field_checkbox('not_expire_on_actions', __('not_expire_on_actions', 'hyper-cache'), __('not_expire_on_actions_desc', 'hyper-cache')); ?>
|
115 |
</tr>
|
116 |
+
<tr valign="top">
|
117 |
+
<?php hyper_field_checkbox('invalidate_single_posts', __('invalidate_single_posts', 'hyper-cache'), __('invalidate_single_posts_desc', 'hyper-cache')); ?>
|
118 |
+
</tr>
|
119 |
<tr valign="top">
|
120 |
<?php hyper_field_checkbox('compress', __('compress_html', 'hyper-cache')); ?>
|
121 |
</tr>
|
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.1
|
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
|
33 |
- fixed behaviour with password protected posts
|
34 |
- added a bit of html compression (not gzip)
|
@@ -113,6 +116,36 @@ function hyper_cache_invalidate($force=false)
|
|
113 |
mkdir(ABSPATH . 'wp-content/hyper-cache', 0766);
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
function hyper_delete_path( $path = '' ) {
|
117 |
if ($handle = opendir($path)) {
|
118 |
while ($file = readdir($handle)) {
|
@@ -140,23 +173,43 @@ function hyper_count() {
|
|
140 |
}
|
141 |
|
142 |
|
143 |
-
if (
|
144 |
{
|
145 |
// Posts
|
146 |
add_action('publish_post', 'hyper_cache_invalidate', 0);
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
add_action('delete_post', 'hyper_cache_invalidate', 0);
|
149 |
add_action('publish_phone', 'hyper_cache_invalidate', 0);
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
}
|
162 |
?>
|
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.1.1
|
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.1.1
|
33 |
+
- added an option to invalidate single post pages
|
34 |
+
|
35 |
Version 1.1
|
36 |
- fixed behaviour with password protected posts
|
37 |
- added a bit of html compression (not gzip)
|
116 |
mkdir(ABSPATH . 'wp-content/hyper-cache', 0766);
|
117 |
}
|
118 |
|
119 |
+
function hyper_cache_invalidate_post($post_id)
|
120 |
+
{
|
121 |
+
hyper_delete_by_post($post_id);
|
122 |
+
}
|
123 |
+
|
124 |
+
function hyper_cache_invalidate_comment($comment_id, $status=1)
|
125 |
+
{
|
126 |
+
if ($status != 1) return;
|
127 |
+
hyper_delete_by_comment($comment_id);
|
128 |
+
//hyper_cache_invalidate();
|
129 |
+
}
|
130 |
+
|
131 |
+
function hyper_delete_by_comment($comment_id)
|
132 |
+
{
|
133 |
+
$comment = get_comment($comment_id);
|
134 |
+
$post_id = $comment->comment_post_ID;
|
135 |
+
hyper_delete_by_post($post_id);
|
136 |
+
}
|
137 |
+
|
138 |
+
function hyper_delete_by_post($post_id)
|
139 |
+
{
|
140 |
+
$link = get_permalink($post_id);
|
141 |
+
$link = substr($link, strpos($link, '/', 7));
|
142 |
+
$file = md5($link);
|
143 |
+
if (file_exists(ABSPATH . 'wp-content/hyper-cache/' . $file . '.dat'))
|
144 |
+
{
|
145 |
+
unlink(ABSPATH . 'wp-content/hyper-cache/' . $file . '.dat');
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
function hyper_delete_path( $path = '' ) {
|
150 |
if ($handle = opendir($path)) {
|
151 |
while ($file = readdir($handle)) {
|
173 |
}
|
174 |
|
175 |
|
176 |
+
if ($hyper_options['cache'] && !$hyper_options['not_expire_on_actions'])
|
177 |
{
|
178 |
// Posts
|
179 |
add_action('publish_post', 'hyper_cache_invalidate', 0);
|
180 |
+
if ($hyper_options['invalidate_single_posts'])
|
181 |
+
{
|
182 |
+
add_action('edit_post', 'hyper_cache_invalidate_post', 0);
|
183 |
+
}
|
184 |
+
else
|
185 |
+
{
|
186 |
+
add_action('edit_post', 'hyper_cache_invalidate', 0);
|
187 |
+
}
|
188 |
add_action('delete_post', 'hyper_cache_invalidate', 0);
|
189 |
add_action('publish_phone', 'hyper_cache_invalidate', 0);
|
190 |
+
add_action('switch_theme', 'hyper_cache_invalidate', 0);
|
191 |
+
|
192 |
+
|
193 |
+
// Coment ID is received
|
194 |
+
//add_action('trackback_post', 'hyper_cache_invalidate', 0);
|
195 |
+
//add_action('pingback_post', 'hyper_cache_invalidate', 0);
|
196 |
+
if ($hyper_options['invalidate_single_posts'])
|
197 |
+
{
|
198 |
+
add_action('comment_post', 'hyper_cache_invalidate_comment', 10, 2);
|
199 |
+
add_action('edit_comment', 'hyper_cache_invalidate_comment', 0);
|
200 |
+
add_action('wp_set_comment_status', 'hyper_cache_invalidate_comment', 0);
|
201 |
+
|
202 |
+
// No post_id is available
|
203 |
+
add_action('delete_comment', 'hyper_cache_invalidate_comment', 0);
|
204 |
+
}
|
205 |
+
else
|
206 |
+
{
|
207 |
+
add_action('comment_post', 'hyper_cache_invalidate', 0);
|
208 |
+
add_action('edit_comment', 'hyper_cache_invalidate', 0);
|
209 |
+
add_action('wp_set_comment_status', 'hyper_cache_invalidate', 0);
|
210 |
+
|
211 |
+
// No post_id is available
|
212 |
+
add_action('delete_comment', 'hyper_cache_invalidate', 0);
|
213 |
+
}
|
214 |
}
|
215 |
?>
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Hyper Cache ===
|
2 |
Tags: cache,chaching
|
3 |
Requires at least: 2.1
|
4 |
-
Tested up to: 2.
|
5 |
-
Stable tag: 1.1
|
6 |
Donate link: http://www.satollo.com/english/donate
|
7 |
Contributors: satollo,momo360modena
|
8 |
|
1 |
=== Hyper Cache ===
|
2 |
Tags: cache,chaching
|
3 |
Requires at least: 2.1
|
4 |
+
Tested up to: 2.6.2
|
5 |
+
Stable tag: 1.1.1
|
6 |
Donate link: http://www.satollo.com/english/donate
|
7 |
Contributors: satollo,momo360modena
|
8 |
|