Hyper Cache - Version 2.9.1.6

Version Description

  • Fixed some debug noticies
Download this release

Release Info

Developer satollo
Plugin Icon wp plugin Hyper Cache
Version 2.9.1.6
Comparing to
See all releases

Code changes from version 2.4.3 to 2.9.1.6

advanced-cache.php DELETED
@@ -1,427 +0,0 @@
1
- <?php
2
- @include(dirname(__FILE__) . '/hyper-cache-config.php');
3
-
4
- global $hyper_cache_stop;
5
- $hyper_cache_stop = false;
6
-
7
- // Do not cache post request (comments, plugins and so on)
8
- if ($_SERVER["REQUEST_METHOD"] == 'POST') return false;
9
-
10
- // Try to avoid enabling the cache if sessions are managed with request parameters and a session is active
11
- if (defined(SID) && SID != '') return false;
12
-
13
- $hyper_uri = $_SERVER['REQUEST_URI'];
14
-
15
- if (!$hyper_cache_cache_qs && strpos($hyper_uri, '?') !== false) return false;
16
-
17
- if (strpos($hyper_uri, 'robots.txt') !== false) return false;
18
-
19
- // Checks for rejected url
20
- if ($hyper_cache_reject)
21
- {
22
- foreach($hyper_cache_reject as $uri)
23
- {
24
- if (substr($uri, 0, 1) == '"')
25
- {
26
- if ($uri == '"' . $hyper_uri . '"') return false;
27
- }
28
- if (substr($hyper_uri, 0, strlen($uri)) == $uri) return false;
29
- }
30
- }
31
-
32
- if (count($hyper_cache_reject_agents) > 0)
33
- {
34
- $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
35
- foreach ($hyper_cache_reject_agents as $hyper_a)
36
- {
37
- if (strpos($hyper_agent, $hyper_a) !== false) return false;
38
- }
39
- }
40
-
41
- // Do not use or cache pages when a wordpress user is logged on
42
- foreach ($_COOKIE as $n=>$v)
43
- {
44
- // If it's required to bypass the cache when the visitor is a commentor, stop.
45
- if ($hyper_cache_comment && substr($n, 0, 15) == 'comment_author_')
46
- {
47
- hyper_cache_stats('commenter');
48
- return false;
49
- }
50
-
51
- // SHIT!!! This test cookie makes to cache not work!!!
52
- if ($n == 'wordpress_test_cookie') continue;
53
- // wp 2.5 and wp 2.3 have different cookie prefix, skip cache if a post password cookie is present, also
54
- if (substr($n, 0, 14) == 'wordpressuser_' || substr($n, 0, 10) == 'wordpress_' || substr($n, 0, 12) == 'wp-postpass_')
55
- {
56
- return false;
57
- }
58
- }
59
-
60
- // Do nestes cycles in this order, usually no cookies are specified
61
- if (count($hyper_cache_reject_cookies) > 0)
62
- {
63
- foreach ($hyper_cache_reject_cookies as $hyper_c)
64
- {
65
- foreach ($_COOKIE as $n=>$v)
66
- {
67
- if (substr($n, 0, strlen($hyper_c)) == $hyper_c) return false;
68
- }
69
- }
70
- }
71
-
72
- // Do not cache WP pages, even if those calls typically don't go throught this script
73
- if (strpos($hyper_uri, '/wp-admin/') !== false || strpos($hyper_uri, '/wp-includes/') !== false || strpos($hyper_uri, '/wp-content/') !== false )
74
- {
75
- return false;
76
- }
77
-
78
- $hyper_uri = $_SERVER['HTTP_HOST'] . $hyper_uri;
79
-
80
- hyper_cache_log('URI: ' . $hyper_uri);
81
-
82
- // The name of the file with html and other data
83
- $hyper_cache_name = md5($hyper_uri);
84
- $hyper_file = ABSPATH . 'wp-content/hyper-cache/' . hyper_mobile_type() . $hyper_cache_name . '.dat';
85
-
86
- // The file is present?
87
- if (is_file($hyper_file))
88
- {
89
- hyper_cache_log('cached page file found: ' . $hyper_cache_name);
90
-
91
- if (!$hyper_cache_timeout || (time() - filectime($hyper_file)) < $hyper_cache_timeout*60)
92
- {
93
- hyper_cache_log('cached page still valid');
94
-
95
- // Load it and check is it's still valid
96
- $hyper_data = unserialize(file_get_contents($hyper_file));
97
-
98
- // Protect against broken cache files and start to check redirects and
99
- // 404.
100
- if ($hyper_data != null)
101
- {
102
-
103
- if ($hyper_data['location'])
104
- {
105
- hyper_cache_log('was a redirect to ' . $hyper_data['location']);
106
- header('Location: ' . $hyper_data['location']);
107
- flush;
108
- die();
109
- }
110
-
111
- // If the URI was a 404 try to load the (unique) 404 cache page, if exists,
112
- // otherwise delete the cached page because it is no more valid.
113
- if ($hyper_data['status'] == 404)
114
- {
115
- hyper_cache_log('was a 404');
116
- $hyper_cache_404_file = ABSPATH . 'wp-content/hyper-cache/404.dat';
117
- $hyper_data = @unserialize(file_get_contents($hyper_cache_404_file));
118
- if ($hyper_data)
119
- {
120
- header("HTTP/1.1 404 Not Found");
121
- hyper_cache_stats('404');
122
- }
123
- else
124
- {
125
- @unlink($hyper_file);
126
- unset($hyper_data);
127
- }
128
- }
129
- }
130
-
131
- // It's time to serve the cached page
132
- if ($hyper_data != null)
133
- {
134
- if (array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER))
135
- {
136
- $if_modified_since = strtotime(preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]));
137
- if ($if_modified_since >= filectime($hyper_file))
138
- {
139
- header("HTTP/1.0 304 Not Modified");
140
- flush();
141
- hyper_cache_stats('304');
142
- die();
143
- }
144
- }
145
-
146
- header('Last-Modified: ' . date("r", filectime($hyper_file)));
147
-
148
- header('Content-Type: ' . $hyper_data['mime']);
149
-
150
- hyper_cache_log('encoding accepted: ' . $_SERVER['HTTP_ACCEPT_ENCODING']);
151
- // Send the cached html
152
- if ($hyper_cache_gzip && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && strlen($hyper_data['gz']) > 0)
153
- {
154
- hyper_cache_log('gzip encoding accepted, serving compressed data');
155
- header('Content-Encoding: gzip');
156
- echo $hyper_data['gz'];
157
- hyper_cache_stats('gzip');
158
- }
159
- else
160
- {
161
- // No compression accepted, check if we have the plain html or
162
- // decompress the compressed one.
163
- if ($hyper_data['html'])
164
- {
165
- hyper_cache_log('serving plain data');
166
- echo $hyper_data['html'];
167
- }
168
- else
169
- {
170
- hyper_cache_log('decoding compressed data (length: ' . strlen($hyper_data['gz']) . ')');
171
- echo hyper_cache_gzdecode($hyper_data['gz']);
172
- }
173
- hyper_cache_stats('plain');
174
- }
175
- flush();
176
- hyper_cache_clean();
177
- die();
178
- }
179
- else
180
- {
181
- hyper_cache_log('[ERROR] unable to deserialize data');
182
- }
183
- }
184
- }
185
- else
186
- {
187
- hyper_cache_log('cached page file NOT found: ' . $hyper_file);
188
- }
189
-
190
- // Now we start the caching, but we remove the cookie which stores the commenter data otherwise the page will be generated
191
- // with a pre compiled comment form...
192
- if (!$hyper_cache_comment)
193
- {
194
- foreach ($_COOKIE as $n=>$v )
195
- {
196
- if (substr($n, 0, 14) == 'comment_author')
197
- {
198
- unset($_COOKIE[$n]);
199
- }
200
- }
201
- }
202
-
203
- hyper_cache_stats('wp');
204
- ob_start('hyper_cache_callback');
205
-
206
- // From here Wordpress starts to process the request
207
-
208
- // Called whenever the page generation is ended
209
- function hyper_cache_callback($buffer)
210
- {
211
- global $hyper_cache_stop, $hyper_cache_charset, $hyper_cache_home, $hyper_cache_redirects, $hyper_redirect, $hyper_file, $hyper_cache_compress, $hyper_cache_name, $hyper_cache_gzip;
212
-
213
- if ($hyper_cache_stop) return $buffer;
214
-
215
- // WP is sending a redirect
216
- if ($hyper_redirect)
217
- {
218
- if ($hyper_cache_redirects)
219
- {
220
- $data['location'] = $hyper_redirect;
221
- hyper_cache_write($data);
222
- }
223
- return $buffer;
224
- }
225
-
226
- if (is_home() && $hyper_cache_home)
227
- {
228
- return $buffer;
229
- }
230
-
231
- if (is_feed() && !$hyper_cache_feed)
232
- {
233
- return $buffer;
234
- }
235
-
236
- $buffer = trim($buffer);
237
-
238
- // Can be a trackback or other things without a body. We do not cache them, WP needs to get those calls.
239
- if (strlen($buffer) == 0) return '';
240
-
241
- if (!$hyper_cache_charset) $hyper_cache_charset = 'UTF-8';
242
-
243
- if (is_feed())
244
- {
245
- $data['mime'] = 'text/xml;charset=' . $hyper_cache_charset;
246
- }
247
- else
248
- {
249
- $data['mime'] = 'text/html;charset=' . $hyper_cache_charset;
250
- }
251
-
252
- // Clean up a it the html, this is a energy saver plugin!
253
- if ($hyper_cache_compress)
254
- {
255
- $buffer = hyper_cache_compress($buffer);
256
- }
257
-
258
- $buffer .= '<!-- hyper cache: ' . $hyper_cache_name . ' -->';
259
-
260
- $data['html'] = $buffer;
261
-
262
- if (is_404())
263
- {
264
- if (!file_exists(ABSPATH . 'wp-content/hyper-cache/404.dat'))
265
- {
266
- $file = fopen(ABSPATH . 'wp-content/hyper-cache/404.dat', 'w');
267
- fwrite($file, serialize($data));
268
- fclose($file);
269
- }
270
- unset($data['html']);
271
- $data['status'] = 404;
272
- }
273
-
274
- hyper_cache_write($data);
275
-
276
- return $buffer;
277
- }
278
-
279
- function hyper_cache_write(&$data)
280
- {
281
- global $hyper_file, $hyper_cache_store_compressed;
282
-
283
- $data['uri'] = $_SERVER['REQUEST_URI'];
284
- // $data['referer'] = $_SERVER['HTTP_REFERER'];
285
- // $data['time'] = time();
286
- // $data['host'] = $_SERVER['HTTP_HOST'];
287
- // $data['agent'] = $_SERVER['HTTP_USER_AGENT'];
288
-
289
- // Look if we need the compressed version
290
- if ($hyper_cache_store_compressed)
291
- {
292
- $data['gz'] = gzencode($data['html']);
293
- if ($data['gz']) unset($data['html']);
294
- }
295
-
296
- $file = fopen($hyper_file, 'w');
297
- fwrite($file, serialize($data));
298
- fclose($file);
299
-
300
- header('Last-Modified: ' . date("r", filectime($hyper_file)));
301
- }
302
-
303
- function hyper_cache_compress(&$buffer)
304
- {
305
- $buffer = ereg_replace("[ \t]+", ' ', $buffer);
306
- $buffer = ereg_replace("[\r\n]", "\n", $buffer);
307
- $buffer = ereg_replace(" *\n *", "\n", $buffer);
308
- $buffer = ereg_replace("\n+", "\n", $buffer);
309
- $buffer = ereg_replace("\" />", "\"/>", $buffer);
310
- $buffer = ereg_replace("<tr>\n", "<tr>", $buffer);
311
- $buffer = ereg_replace("<td>\n", "<td>", $buffer);
312
- $buffer = ereg_replace("<ul>\n", "<ul>", $buffer);
313
- $buffer = ereg_replace("</ul>\n", "</ul>", $buffer);
314
- $buffer = ereg_replace("<p>\n", "<p>", $buffer);
315
- $buffer = ereg_replace("</p>\n", "</p>", $buffer);
316
- $buffer = ereg_replace("</li>\n", "</li>", $buffer);
317
- $buffer = ereg_replace("</td>\n", "</td>", $buffer);
318
-
319
- return $buffer;
320
- }
321
-
322
-
323
- function hyper_mobile_type()
324
- {
325
- global $hyper_cache_mobile, $hyper_cache_mobile_agents;
326
-
327
- if (!$hyper_cache_mobile || !$hyper_cache_mobile_agents) return '';
328
-
329
- $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
330
- //$hyper_agents = explode(',', "elaine/3.0,iphone,ipod,palm,eudoraweb,blazer,avantgo,windows ce,cellphone,small,mmef20,danger,hiptop,proxinet,newt,palmos,netfront,sharp-tq-gx10,sonyericsson,symbianos,up.browser,up.link,ts21i-10,mot-v,portalmmm,docomo,opera mini,palm,handspring,nokia,kyocera,samsung,motorola,mot,smartphone,blackberry,wap,playstation portable,lg,mmp,opwv,symbian,epoc");
331
- foreach ($hyper_cache_mobile_agents as $hyper_a)
332
- {
333
- if (strpos($hyper_agent, $hyper_a) !== false)
334
- {
335
- if (strpos($hyper_agent, 'iphone') || strpos($hyper_agent, 'ipod'))
336
- {
337
- return 'iphone';
338
- }
339
- else
340
- {
341
- return 'pda';
342
- }
343
- }
344
- }
345
- return '';
346
- }
347
-
348
- function hyper_cache_clean()
349
- {
350
- global $hyper_cache_timeout, $hyper_cache_clean_interval;
351
-
352
- if (!$hyper_cache_clean_interval || !$hyper_cache_timeout) return;
353
- if (rand(1, 10) != 5) return;
354
-
355
- hyper_cache_log('start cleaning');
356
-
357
- $time = time();
358
- $file = ABSPATH . 'wp-content/hyper-cache/last-clean.dat';
359
- if (file_exists($file) && ($time - filectime($file) < $hyper_cache_clean_interval*60)) return;
360
-
361
- touch(ABSPATH . 'wp-content/hyper-cache/last-clean.dat');
362
-
363
- $path = ABSPATH . 'wp-content/hyper-cache';
364
- if ($handle = @opendir($path))
365
- {
366
- while ($file = readdir($handle))
367
- {
368
- if ($file == '.' || $file == '..') continue;
369
-
370
- $t = filectime($path . '/' . $file);
371
- if ($time - $t > $hyper_cache_timeout*60) @unlink($path . '/' . $file);
372
- }
373
- closedir($handle);
374
- }
375
- hyper_cache_log('end cleaning');
376
- }
377
-
378
-
379
- function hyper_cache_gzdecode ($data)
380
- {
381
- hyper_cache_log('gzdecode called with data length ' + strlen($data));
382
-
383
- $flags = ord(substr($data, 3, 1));
384
- $headerlen = 10;
385
- $extralen = 0;
386
-
387
- $filenamelen = 0;
388
- if ($flags & 4) {
389
- $extralen = unpack('v' ,substr($data, 10, 2));
390
-
391
- $extralen = $extralen[1];
392
- $headerlen += 2 + $extralen;
393
- }
394
- if ($flags & 8) // Filename
395
-
396
- $headerlen = strpos($data, chr(0), $headerlen) + 1;
397
- if ($flags & 16) // Comment
398
-
399
- $headerlen = strpos($data, chr(0), $headerlen) + 1;
400
- if ($flags & 2) // CRC at end of file
401
-
402
- $headerlen += 2;
403
- $unpacked = gzinflate(substr($data, $headerlen));
404
- if ($unpacked === FALSE) $unpacked = $data;
405
- return $unpacked;
406
- }
407
-
408
-
409
- function hyper_cache_log($text)
410
- {
411
- // $file = fopen(dirname(__FILE__) . '/hyper_cache.log', 'a');
412
- // if (!$file) return;
413
- // fwrite($file, $_SERVER['REMOTE_ADDR'] . ' ' . date('Y-m-d H:i:s') . ' ' . $text . "\n");
414
- // fclose($file);
415
- }
416
-
417
- function hyper_cache_stats($type)
418
- {
419
- global $hyper_cache_stats;
420
-
421
- if (!$hyper_cache_stats) return;
422
- $file = fopen(dirname(__FILE__) . '/hyper-cache-' . $type . '.txt', 'a');
423
- if (!$file) return;
424
- fwrite($file, 'x');
425
- fclose($file);
426
- }
427
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cache.php ADDED
@@ -0,0 +1,367 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ global $hyper_cache_stop;
4
+
5
+ $hyper_cache_stop = false;
6
+
7
+ // If no-cache header support is enabled and the browser explicitly requests a fresh page, do not cache
8
+ if ($hyper_cache_nocache &&
9
+ ((!empty($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') ||
10
+ (!empty($_SERVER['HTTP_PRAGMA']) && $_SERVER['HTTP_PRAGMA'] == 'no-cache'))) return hyper_cache_exit();
11
+
12
+ // Do not cache post request (comments, plugins and so on)
13
+ if ($_SERVER["REQUEST_METHOD"] == 'POST') return hyper_cache_exit();
14
+
15
+ // Try to avoid enabling the cache if sessions are managed with request parameters and a session is active
16
+ if (defined('SID') && SID != '') return hyper_cache_exit();
17
+
18
+ $hyper_uri = $_SERVER['REQUEST_URI'];
19
+ $hyper_qs = strpos($hyper_uri, '?');
20
+
21
+ if ($hyper_qs !== false) {
22
+ if ($hyper_cache_strip_qs) $hyper_uri = substr($hyper_uri, 0, $hyper_qs);
23
+ else if (!$hyper_cache_cache_qs) return hyper_cache_exit();
24
+ }
25
+
26
+ if (strpos($hyper_uri, 'robots.txt') !== false) return hyper_cache_exit();
27
+
28
+ // Checks for rejected url
29
+ if ($hyper_cache_reject !== false) {
30
+ foreach($hyper_cache_reject as $uri) {
31
+ if (substr($uri, 0, 1) == '"') {
32
+ if ($uri == '"' . $hyper_uri . '"') return hyper_cache_exit();
33
+ }
34
+ if (substr($hyper_uri, 0, strlen($uri)) == $uri) return hyper_cache_exit();
35
+ }
36
+ }
37
+
38
+ if ($hyper_cache_reject_agents !== false) {
39
+ $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
40
+ foreach ($hyper_cache_reject_agents as $hyper_a) {
41
+ if (strpos($hyper_agent, $hyper_a) !== false) return hyper_cache_exit();
42
+ }
43
+ }
44
+
45
+ // Do nested cycles in this order, usually no cookies are specified
46
+ if ($hyper_cache_reject_cookies !== false) {
47
+ foreach ($hyper_cache_reject_cookies as $hyper_c) {
48
+ foreach ($_COOKIE as $n=>$v) {
49
+ if (substr($n, 0, strlen($hyper_c)) == $hyper_c) return hyper_cache_exit();
50
+ }
51
+ }
52
+ }
53
+
54
+ // Do not use or cache pages when a wordpress user is logged on
55
+
56
+ foreach ($_COOKIE as $n=>$v) {
57
+ // If it's required to bypass the cache when the visitor is a commenter, stop.
58
+ if ($hyper_cache_comment && substr($n, 0, 15) == 'comment_author_') return hyper_cache_exit();
59
+
60
+ // SHIT!!! This test cookie makes to cache not work!!!
61
+ if ($n == 'wordpress_test_cookie') continue;
62
+ // wp 2.5 and wp 2.3 have different cookie prefix, skip cache if a post password cookie is present, also
63
+ if (substr($n, 0, 14) == 'wordpressuser_' || substr($n, 0, 10) == 'wordpress_' || substr($n, 0, 12) == 'wp-postpass_') {
64
+ return hyper_cache_exit();
65
+ }
66
+ }
67
+
68
+ // Do not cache WP pages, even if those calls typically don't go throught this script
69
+ if (strpos($hyper_uri, '/wp-') !== false) return hyper_cache_exit();
70
+
71
+ // Multisite
72
+ if (function_exists('is_multisite') && is_multisite() && strpos($hyper_uri, '/files/') !== false) return hyper_cache_exit();
73
+
74
+ // Prefix host, and for wordpress 'pretty URLs' strip trailing slash (e.g. '/my-post/' -> 'my-site.com/my-post')
75
+ $hyper_uri = $_SERVER['HTTP_HOST'] . $hyper_uri;
76
+
77
+ // The name of the file with html and other data
78
+ $hyper_cache_name = md5($hyper_uri);
79
+ $hc_file = $hyper_cache_path . $hyper_cache_name . hyper_mobile_type() . '.dat';
80
+
81
+ if (!file_exists($hc_file)) {
82
+ hyper_cache_start(false);
83
+ return;
84
+ }
85
+
86
+ $hc_file_time = @filemtime($hc_file);
87
+ $hc_file_age = time() - $hc_file_time;
88
+
89
+ if ($hc_file_age > $hyper_cache_timeout) {
90
+ hyper_cache_start();
91
+ return;
92
+ }
93
+
94
+ $hc_invalidation_time = @filemtime($hyper_cache_path . '_global.dat');
95
+ if ($hc_invalidation_time && $hc_file_time < $hc_invalidation_time) {
96
+ hyper_cache_start();
97
+ return;
98
+ }
99
+
100
+ if (array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER)) {
101
+ $if_modified_since = strtotime(preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]));
102
+ if ($if_modified_since >= $hc_file_time) {
103
+ header($_SERVER['SERVER_PROTOCOL'] . " 304 Not Modified");
104
+ flush();
105
+ die();
106
+ }
107
+ }
108
+
109
+ // Load it and check is it's still valid
110
+ $hyper_data = @unserialize(file_get_contents($hc_file));
111
+
112
+ if (!$hyper_data) {
113
+ hyper_cache_start();
114
+ return;
115
+ }
116
+
117
+ if ($hyper_data['type'] == 'home' || $hyper_data['type'] == 'archive') {
118
+
119
+ $hc_invalidation_archive_file = @filemtime($hyper_cache_path . '_archives.dat');
120
+ if ($hc_invalidation_archive_file && $hc_file_time < $hc_invalidation_archive_file) {
121
+ hyper_cache_start();
122
+ return;
123
+ }
124
+ }
125
+
126
+ // Valid cache file check ends here
127
+
128
+ if (!empty($hyper_data['location'])) {
129
+ header('Location: ' . $hyper_data['location']);
130
+ flush();
131
+ die();
132
+ }
133
+
134
+ // It's time to serve the cached page
135
+
136
+ if (!$hyper_cache_browsercache) {
137
+ // True if browser caching NOT enabled (default)
138
+ header('Cache-Control: no-cache, must-revalidate, max-age=0');
139
+ header('Pragma: no-cache');
140
+ header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
141
+ }
142
+ else {
143
+ $maxage = $hyper_cache_timeout - $hc_file_age;
144
+ header('Cache-Control: max-age=' . $maxage);
145
+ header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $maxage) . " GMT");
146
+ }
147
+
148
+ // True if user ask to NOT send Last-Modified
149
+ if (!$hyper_cache_lastmodified) {
150
+ header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $hc_file_time). " GMT");
151
+ }
152
+
153
+ header('Content-Type: ' . $hyper_data['mime']);
154
+ if (isset($hyper_data['status']) && $hyper_data['status'] == 404) header($_SERVER['SERVER_PROTOCOL'] . " 404 Not Found");
155
+
156
+ // Send the cached html
157
+ if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false &&
158
+ (($hyper_cache_gzip && !empty($hyper_data['gz'])) || ($hyper_cache_gzip_on_the_fly && function_exists('gzencode')))) {
159
+ header('Content-Encoding: gzip');
160
+ header('Vary: Accept-Encoding');
161
+ if (!empty($hyper_data['gz'])) {
162
+ echo $hyper_data['gz'];
163
+ }
164
+ else {
165
+ echo gzencode($hyper_data['html']);
166
+ }
167
+ }
168
+ else {
169
+ // No compression accepted, check if we have the plain html or
170
+ // decompress the compressed one.
171
+ if (!empty($hyper_data['html'])) {
172
+ //header('Content-Length: ' . strlen($hyper_data['html']));
173
+ echo $hyper_data['html'];
174
+ }
175
+ else if (function_exists('gzinflate')) {
176
+ $buffer = hyper_cache_gzdecode($hyper_data['gz']);
177
+ if ($buffer === false) echo 'Error retrieving the content';
178
+ else echo $buffer;
179
+ }
180
+ else {
181
+ // Cannot decode compressed data, serve fresh page
182
+ return false;
183
+ }
184
+ }
185
+ flush();
186
+ die();
187
+
188
+
189
+ function hyper_cache_start($delete=true) {
190
+ global $hc_file;
191
+
192
+ if ($delete) @unlink($hc_file);
193
+ foreach ($_COOKIE as $n=>$v ) {
194
+ if (substr($n, 0, 14) == 'comment_author') {
195
+ unset($_COOKIE[$n]);
196
+ }
197
+ }
198
+ ob_start('hyper_cache_callback');
199
+ }
200
+
201
+ // From here Wordpress starts to process the request
202
+
203
+ // Called whenever the page generation is ended
204
+ function hyper_cache_callback($buffer) {
205
+ global $hyper_cache_notfound, $hyper_cache_stop, $hyper_cache_charset, $hyper_cache_home, $hyper_cache_redirects, $hyper_redirect, $hc_file, $hyper_cache_name, $hyper_cache_browsercache, $hyper_cache_timeout, $hyper_cache_lastmodified, $hyper_cache_gzip, $hyper_cache_gzip_on_the_fly;
206
+
207
+ if (!function_exists('is_home')) return $buffer;
208
+ if (!function_exists('is_front_page')) return $buffer;
209
+
210
+ if (function_exists('apply_filters')) $buffer = apply_filters('hyper_cache_buffer', $buffer);
211
+
212
+ if ($hyper_cache_stop) return $buffer;
213
+
214
+ if (!$hyper_cache_notfound && is_404()) {
215
+ return $buffer;
216
+ }
217
+
218
+ if (strpos($buffer, '</body>') === false) return $buffer;
219
+
220
+ // WP is sending a redirect
221
+ if ($hyper_redirect) {
222
+ if ($hyper_cache_redirects) {
223
+ $data['location'] = $hyper_redirect;
224
+ hyper_cache_write($data);
225
+ }
226
+ return $buffer;
227
+ }
228
+
229
+ if ((is_home() || is_front_page()) && $hyper_cache_home) {
230
+ return $buffer;
231
+ }
232
+
233
+ if (is_feed() && !$hyper_cache_feed) {
234
+ return $buffer;
235
+ }
236
+
237
+ if (is_home() || is_front_page()) $data['type'] = 'home';
238
+ else if (is_feed()) $data['type'] = 'feed';
239
+ else if (is_archive()) $data['type'] = 'archive';
240
+ else if (is_single()) $data['type'] = 'single';
241
+ else if (is_page()) $data['type'] = 'page';
242
+ $buffer = trim($buffer);
243
+
244
+ // Can be a trackback or other things without a body. We do not cache them, WP needs to get those calls.
245
+ if (strlen($buffer) == 0) return '';
246
+
247
+ if (!$hyper_cache_charset) $hyper_cache_charset = 'UTF-8';
248
+
249
+ if (is_feed()) {
250
+ $data['mime'] = 'text/xml;charset=' . $hyper_cache_charset;
251
+ }
252
+ else {
253
+ $data['mime'] = 'text/html;charset=' . $hyper_cache_charset;
254
+ }
255
+
256
+ $buffer .= '<!-- hyper cache: ' . $hyper_cache_name . ' ' . date('y-m-d h:i:s') .' -->';
257
+
258
+ $data['html'] = $buffer;
259
+
260
+ if (is_404()) $data['status'] = 404;
261
+
262
+ hyper_cache_write($data);
263
+
264
+ if ($hyper_cache_browsercache) {
265
+ header('Cache-Control: max-age=' . $hyper_cache_timeout);
266
+ header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $hyper_cache_timeout) . " GMT");
267
+ }
268
+
269
+ // True if user ask to NOT send Last-Modified
270
+ if (!$hyper_cache_lastmodified) {
271
+ header('Last-Modified: ' . gmdate("D, d M Y H:i:s", @filemtime($hc_file)). " GMT");
272
+ }
273
+
274
+ if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false &&
275
+ (($hyper_cache_gzip && !empty($data['gz'])) || ($hyper_cache_gzip_on_the_fly && !empty($data['html']) && function_exists('gzencode')))) {
276
+ header('Content-Encoding: gzip');
277
+ header('Vary: Accept-Encoding');
278
+ if (empty($data['gz'])) {
279
+ $data['gz'] = gzencode($data['html']);
280
+ }
281
+ return $data['gz'];
282
+ }
283
+
284
+ return $buffer;
285
+ }
286
+
287
+ function hyper_cache_write(&$data) {
288
+ global $hc_file, $hyper_cache_store_compressed;
289
+
290
+ $data['uri'] = $_SERVER['REQUEST_URI'];
291
+
292
+ // Look if we need the compressed version
293
+ if ($hyper_cache_store_compressed && !empty($data['html']) && function_exists('gzencode')) {
294
+ $data['gz'] = gzencode($data['html']);
295
+ if ($data['gz']) unset($data['html']);
296
+ }
297
+ $file = fopen($hc_file, 'w');
298
+ fwrite($file, serialize($data));
299
+ fclose($file);
300
+ }
301
+
302
+ function hyper_mobile_type() {
303
+ global $hyper_cache_mobile, $hyper_cache_mobile_agents, $hyper_cache_plugin_mobile_pack;
304
+
305
+ if ($hyper_cache_plugin_mobile_pack) {
306
+ @include_once ABSPATH . 'wp-content/plugins/wordpress-mobile-pack/plugins/wpmp_switcher/lite_detection.php';
307
+ if (function_exists('lite_detection')) {
308
+ $is_mobile = lite_detection();
309
+ if (!$is_mobile) return '';
310
+ include_once ABSPATH . 'wp-content/plugins/wordpress-mobile-pack/themes/mobile_pack_base/group_detection.php';
311
+ if (function_exists('group_detection')) {
312
+ return 'mobile' . group_detection();
313
+ }
314
+ else return 'mobile';
315
+ }
316
+ }
317
+
318
+ if (!isset($hyper_cache_mobile) || $hyper_cache_mobile_agents === false) return '';
319
+
320
+ $hyper_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
321
+ if (!empty($hyper_cache_mobile_agents)) {
322
+ foreach ($hyper_cache_mobile_agents as $hyper_a) {
323
+ if (strpos($hyper_agent, $hyper_a) !== false) {
324
+ if (strpos($hyper_agent, 'iphone') || strpos($hyper_agent, 'ipod')) {
325
+ return 'iphone';
326
+ }
327
+ else {
328
+ return 'pda';
329
+ }
330
+ }
331
+ }
332
+ }
333
+ return '';
334
+ }
335
+
336
+ function hyper_cache_gzdecode ($data) {
337
+
338
+ $flags = ord(substr($data, 3, 1));
339
+ $headerlen = 10;
340
+ $extralen = 0;
341
+
342
+ $filenamelen = 0;
343
+ if ($flags & 4) {
344
+ $extralen = unpack('v' ,substr($data, 10, 2));
345
+
346
+ $extralen = $extralen[1];
347
+ $headerlen += 2 + $extralen;
348
+ }
349
+ if ($flags & 8) // Filename
350
+
351
+ $headerlen = strpos($data, chr(0), $headerlen) + 1;
352
+ if ($flags & 16) // Comment
353
+
354
+ $headerlen = strpos($data, chr(0), $headerlen) + 1;
355
+ if ($flags & 2) // CRC at end of file
356
+
357
+ $headerlen += 2;
358
+ $unpacked = gzinflate(substr($data, $headerlen));
359
+ return $unpacked;
360
+ }
361
+
362
+ function hyper_cache_exit() {
363
+ global $hyper_cache_gzip_on_the_fly;
364
+
365
+ if ($hyper_cache_gzip_on_the_fly && extension_loaded('zlib')) ob_start('ob_gzhandler');
366
+ return false;
367
+ }
header.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <table cellpadding="0" cellspacing="0" border="0" style="border: 1px solid #ddd; background-color: #f7f7ff; padding: 10px;">
2
+ <tr>
3
+ <td valign="middle" align="left" width="110">
4
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RJB428Z5KJPR4" target="_blank"><img src="http://www.satollo.net/images/donate.gif"/></a>
5
+ </td>
6
+ <td valign="top" align="left">
7
+ <strong>Your donation is like a diamond: it's forever</strong>.
8
+ More about <a href="http://www.satollo.net/donations" target="_blank">donations I receive</a>.
9
+ See <a href="http://www.satollo.net/plugins" target="_blank"><strong>other plugins</strong></a> that can be useful for your blog.
10
+ <form method="post" action="http://www.satollo.net/subscribe" target="_blank">
11
+ Subscribe my newsletter: <input name="ne" value="Your email" onclick="if (this.defaultValue==this.value) this.value=''" onblur="if (this.value=='') this.value=this.defaultValue"> <input type="hidden" value="s" name="na"> <input type="hidden" value="plugin" name="nr"><input type="submit" value="Subscribe">
12
+ </form>
13
+ </td>
14
+ </tr>
15
+ </table>
hyper-cache-cron.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- @include(dirname(__FILE__) . '/hyper-cache-config.php');
3
-
4
- $action = $_GET['action'];
5
- if (!$action || !$_GET['key'] || $_GET['key'] != $hyper_cache_cron_key)
6
- {
7
- sleep(3);
8
- die('no valid call');
9
- }
10
-
11
- if ($action == 'invalidate')
12
- {
13
- $path = dirname(__FILE__) . '/hyper-cache';
14
- if ($handle = @opendir($path))
15
- {
16
- while ($file = readdir($handle))
17
- {
18
- if ($file != '.' && $file != '..')
19
- {
20
- @unlink($path . '/' . $file);
21
- }
22
- }
23
- closedir($handle);
24
- }
25
- else
26
- {
27
- die('ko');
28
- }
29
- die('ok');
30
- }
31
-
32
- die('unknown action');
33
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hyper-cache-fr_FR.mo ADDED
Binary file
hyper-cache-fr_FR.po ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2012
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Hyper Cache FR\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
7
+ "POT-Creation-Date: 2012-01-25 22:02:42+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2012-06-15 18:02+0100\n"
12
+ "Last-Translator: QuentinTurquet.com <quentin.turquet@gmail.com>\n"
13
+ "Language-Team: TradPress.fr <tradpress@gmail.com>\n"
14
+ "X-Poedit-Language: French\n"
15
+ "X-Poedit-Country: FRANCE\n"
16
+
17
+ #: options.php:92
18
+ msgid "You must add to the file wp-config.php (at its beginning after the &lt;?php) the line of code: <code>define('WP_CACHE', true);</code>."
19
+ msgstr "Vous devez ajouter au fichier wp-config (au début après le &lt;?php) la ligne de code : <code>define('WP_CACHE', true);</code>."
20
+
21
+ #: options.php:103
22
+ msgid "<p><strong>Options saved BUT not active because Hyper Cache was not able to update the file wp-content/advanced-cache.php (is it writable?).</strong></p>"
23
+ msgstr "<p><strong>Les options ont été enregistrées MAIS non actives, car Hyper Cache n'est pas capable de mettre à jour le fichier wp-content/advanced-cache.php (est-il accessible en écriture ?).</strong></p>"
24
+
25
+ #: options.php:109
26
+ msgid "<p><strong>Hyper Cache was not able to create the folder \"wp-content/cache/hyper-cache\". Make it manually setting permissions to 777.</strong></p>"
27
+ msgstr "<p><strong>Hyper Cache n'est pas capable de créer le dossier \"wp-content/cache/hyper-cache\". Mettez manuellement les permissions en CHMOD 777.</strong></p>"
28
+
29
+ #: options.php:114
30
+ msgid "You can find more details about configurations and working mode on <a href=\"%s\">Hyper Cache official page</a>."
31
+ msgstr "Vous pouvez trouver plus de détails à propos des configurations sur <a href=\"%s\">la page officielle Hyper Cache</a>."
32
+
33
+ #: options.php:123
34
+ msgid "Clear cache"
35
+ msgstr "Nettoyer le cache"
36
+
37
+ #: options.php:126
38
+ msgid "Cache status"
39
+ msgstr "Statut du cache"
40
+
41
+ #: options.php:129
42
+ msgid "Files in cache (valid and expired)"
43
+ msgstr "Fichiers en cache (valides et expirés)"
44
+
45
+ #: options.php:133
46
+ msgid "Cleaning process"
47
+ msgstr "Procédure de nettoyage"
48
+
49
+ #: options.php:135
50
+ msgid "Next run on: "
51
+ msgstr "Prochaine mise à jour le :"
52
+
53
+ #: options.php:142
54
+ msgid "The cleaning process runs hourly and it's ok to run it hourly: that grant you an efficient cache. If above there is not a valid next run time, wait 10 seconds and reenter this panel. If nothing change, try to deactivate and reactivate Hyper Cache."
55
+ msgstr "Le processus de nettoyage fonctionne toutes les heures et est actif pour fonctionner à chaque heure : cela garantie un cache efficace. Si, ci-dessus, le temps entré pour le prochain fonctionnement n'est pas valide, attendez 10 secondes et réentrez-le dans le panel. Si rien ne change, essayez de désactiver et de réactiver Hyper Cache."
56
+
57
+ #: options.php:149
58
+ msgid "Configuration"
59
+ msgstr "Configuration"
60
+
61
+ #: options.php:154
62
+ msgid "Cached pages timeout"
63
+ msgstr "Pages en cache (temps écoulé)"
64
+
65
+ #: options.php:157
66
+ msgid "minutes"
67
+ msgstr "minutes"
68
+
69
+ #: options.php:159
70
+ msgid ""
71
+ "Minutes a cached page is valid and served to users. A zero value means a cached page is\r\n"
72
+ " valid forever."
73
+ msgstr ""
74
+ "Les minutes d'une page mise en cache sont valides et servies aux utilisateurs. Une valeur nulle signifie qu'une page mise en cache est\r\n"
75
+ " valide pour toujours."
76
+
77
+ #: options.php:161
78
+ msgid ""
79
+ "If a cached page is older than specified value (expired) it is no more used and\r\n"
80
+ " will be regenerated on next request of it."
81
+ msgstr ""
82
+ "Si une page mise en cache est plus ancienne que la valeur spécifiée (expirée) Ce n'est plus utilisé et\r\n"
83
+ " sera de nouveau générée lors de la requête suivante."
84
+
85
+ #: options.php:163
86
+ msgid "720 minutes is half a day, 1440 is a full day and so on."
87
+ msgstr "720 minutes est la moitié d'une journée, 1440 est un jour entier."
88
+
89
+ #: options.php:169
90
+ msgid "Cache invalidation mode"
91
+ msgstr "Mode invalide du cache"
92
+
93
+ #: options.php:172
94
+ msgid "All cached pages"
95
+ msgstr "Toutes les pages en cache"
96
+
97
+ #: options.php:173
98
+ msgid "Only modified posts"
99
+ msgstr "Seulement les articles modifiés"
100
+
101
+ #: options.php:174
102
+ msgid "Only modified pages"
103
+ msgstr "Seulement les pages modifiées"
104
+
105
+ #: options.php:175
106
+ msgid "Nothing"
107
+ msgstr "Rien"
108
+
109
+ #: options.php:179
110
+ msgid "Invalidate home, archives, categories on single post invalidation"
111
+ msgstr "Invalider l'accueil, archives, catégories sur les articles invalidés."
112
+
113
+ #: options.php:182
114
+ msgid "\"Invalidation\" is the process of deleting cached pages when they are no more valid."
115
+ msgstr "\"Invalidation\" est un processus de suppression des pages mises en cache lorsqu'elles ne sont plus valides."
116
+
117
+ #: options.php:183
118
+ msgid ""
119
+ "Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so\r\n"
120
+ " one or more cached pages need to be refreshed to get that new content."
121
+ msgstr ""
122
+ "Le processus d'invalidation est mis en marche lorsque le contenu du blog est modifié (nouvel article, mise à jour d'un article, commentaire,...) donc\r\n"
123
+ " une ou plusieurs pages mises en chage doivent être rafraîchies pour afficher le nouveau contenu."
124
+
125
+ #: options.php:185
126
+ msgid ""
127
+ "A new comment submission or a comment moderation is considered like a post modification\r\n"
128
+ " where the post is the one the comment is relative to."
129
+ msgstr ""
130
+ "La soumission d'un commentaire ou la modération d'un commentaire est considérée comme une modification de l'article\r\n"
131
+ " où l'article est celui où le commentaire en question se situe."
132
+
133
+ #: options.php:192
134
+ msgid "Disable cache for commenters"
135
+ msgstr "Désactiver le cache pour les commentaires"
136
+
137
+ #: options.php:196
138
+ msgid ""
139
+ "When users leave comments, WordPress show pages with their comments even if in moderation\r\n"
140
+ " (and not visible to others) and pre-fills the comment form."
141
+ msgstr ""
142
+ "Lorsque des utilisateurs laissent des commentaires, WordPress affiche les pages comme si les commentaires étaient en attente de validation\r\n"
143
+ " (et ne sont pas visibles pour les autres) et pré-rempli le formulaire de commentaire."
144
+
145
+ #: options.php:198
146
+ msgid "If you want to keep those features, enable this option."
147
+ msgstr "Si vous voulez garder ces fonctions, activez cette option."
148
+
149
+ #: options.php:199
150
+ msgid "The caching system will be less efficient but the blog more usable."
151
+ msgstr "Le système de cache sera moins efficace, mais le blog plus utilisable."
152
+
153
+ #: options.php:206
154
+ msgid "Feeds caching"
155
+ msgstr "Fils mis en cache"
156
+
157
+ #: options.php:210
158
+ msgid "When enabled the blog feeds will be cache as well."
159
+ msgstr "Lorsqu'activé, les fils du blog seront aussi en cache."
160
+
161
+ #: options.php:211
162
+ msgid ""
163
+ "Usually this options has to be left unchecked but if your blog is rather static,\r\n"
164
+ " you can enable it and have a bit more efficiency"
165
+ msgstr ""
166
+ "D'habitude ces options doivent rester décochées, mais si votre blog est plutôt statique,\r\n"
167
+ " vous pouvez l'activer pour gagner un petit peu de rapidité."
168
+
169
+ #: options.php:218
170
+ #: options.php:256
171
+ #: options.php:297
172
+ #: options.php:449
173
+ msgid "Update"
174
+ msgstr "Mettre à jour"
175
+
176
+ #: options.php:221
177
+ msgid "Configuration for mobile devices"
178
+ msgstr "Configuration pour les téléphones portables"
179
+
180
+ #: options.php:234
181
+ msgid "Detect mobile devices"
182
+ msgstr "Détecter les téléphones portables"
183
+
184
+ #: options.php:238
185
+ msgid "When enabled mobile devices will be detected and the cached page stored under different name."
186
+ msgstr "Lorsqu'un appareil mobile valide sera détecté, la page mise en cache sera stockée sous un nom différent."
187
+
188
+ #: options.php:239
189
+ msgid "This makes blogs with different themes for mobile devices to work correctly."
190
+ msgstr "Ceci fait des blogs avec des thèmes différents pour permettre à des dispositifs mobiles de fonctionner correctement."
191
+
192
+ #: options.php:245
193
+ msgid "Mobile agent list"
194
+ msgstr "Liste d'agents de mobile"
195
+
196
+ #: options.php:249
197
+ msgid "One per line mobile agents to check for when a page is requested."
198
+ msgstr "Un mobile agent par ligne pour vérifier quand la page est demandée."
199
+
200
+ #: options.php:250
201
+ msgid "The mobile agent string is matched against the agent a device is sending to the server."
202
+ msgstr "La série mobile agent correspond quand l'agent est un dispositif envoyé au serveur."
203
+
204
+ #: options.php:260
205
+ msgid "Compression"
206
+ msgstr "Compression"
207
+
208
+ #: options.php:264
209
+ msgid "Your hosting space has not the \"gzencode\" or \"gzinflate\" function, so no compression options are available."
210
+ msgstr "Votre hébergeur ne possède pas la fonction \"gzencode\" ou \"gzinflate\", donc aucune option de compression n'est disponible."
211
+
212
+ #: options.php:270
213
+ msgid "Enable compression"
214
+ msgstr "Activer la compression"
215
+
216
+ #: options.php:274
217
+ msgid "When possible the page will be sent compressed to save bandwidth."
218
+ msgstr "Quand cela est possible, la page sera envoyée compressée pour préserver la bande passante."
219
+
220
+ #: options.php:275
221
+ msgid ""
222
+ "Only the textual part of a page can be compressed, not images, so a photo\r\n"
223
+ " blog will consume a lot of bandwidth even with compression enabled."
224
+ msgstr ""
225
+ "Seulement la partie textuelle d'une page peut être compressée, pas les images, donc une photo\r\n"
226
+ " du blog va consommer beaucoup de bande passante lorsque la compression sera active."
227
+
228
+ #: options.php:277
229
+ #: options.php:291
230
+ msgid "Leave the options disabled if you note malfunctions, like blank pages."
231
+ msgstr "Laisser cette option désactivée si vous notez des erreurs, comme des pages blanches."
232
+
233
+ #: options.php:279
234
+ msgid "If you enable this option, the option below will be enabled as well."
235
+ msgstr "Si vous activez cette option, l'option ci-dessous sera aussi activée."
236
+
237
+ #: options.php:285
238
+ msgid "Disk space usage"
239
+ msgstr "Usage de l'espace disque"
240
+
241
+ #: options.php:289
242
+ msgid "Enable this option to minimize disk space usage."
243
+ msgstr "Activer cette option pour minimiser l'usage en espace disque."
244
+
245
+ #: options.php:290
246
+ msgid "The cache will be a little less performant."
247
+ msgstr "Le cache sera un peu moins performant."
248
+
249
+ #: options.php:302
250
+ msgid "Advanced options"
251
+ msgstr "Options avancées"
252
+
253
+ #: options.php:306
254
+ msgid "Translation"
255
+ msgstr "Traduction"
256
+
257
+ #: options.php:310
258
+ msgid "DO NOT show this panel translated."
259
+ msgstr "NE PAS montrer ce panel traduit."
260
+
261
+ #: options.php:316
262
+ msgid "Disable Last-Modified header"
263
+ msgstr "Désactiver le haut de page Dernier Modifié"
264
+
265
+ #: options.php:320
266
+ msgid "Disable some HTTP headers (Last-Modified) which improve performances but some one is reporting they create problems which some hosting configurations."
267
+ msgstr "Mettez hors de service quelques en-têtes HTTP (Derniers-modifiés) qui vaaméliorer le fonctionnement, mais quelqu'un a rapporté que cela crée des problèmes de configurations sur certains hébergements."
268
+
269
+ #: options.php:326
270
+ msgid "Home caching"
271
+ msgstr "Accueil en cache"
272
+
273
+ #: options.php:330
274
+ msgid "DO NOT cache the home page so it is always fresh."
275
+ msgstr "NE PAS mettre en cache la page d'accueil si elle est toujours mise à jour."
276
+
277
+ #: options.php:336
278
+ msgid "Redirect caching"
279
+ msgstr "Redirection en cache"
280
+
281
+ #: options.php:340
282
+ msgid "Cache WordPress redirects."
283
+ msgstr "Redirections Cache WordPress."
284
+
285
+ #: options.php:341
286
+ msgid "WordPress sometime sends back redirects that can be cached to avoid further processing time."
287
+ msgstr "WordPress renvoie parfois en arrière ce qui peut être mis en cache pour éviter un nouveau temps de traitement."
288
+
289
+ #: options.php:346
290
+ msgid "Page not found caching (HTTP 404)"
291
+ msgstr "Page mise en cache non trouvée (HTTP 404)"
292
+
293
+ #: options.php:369
294
+ msgid "URL with parameters"
295
+ msgstr "URL avec paramètres"
296
+
297
+ #: options.php:373
298
+ msgid "Cache requests with query string (parameters)."
299
+ msgstr "Requête en cache avec query string (paramétrages)."
300
+
301
+ #: options.php:374
302
+ msgid "This option has to be enabled for blogs which have post URLs with a question mark on them."
303
+ msgstr "Cette option peut être activée pour les blogs qui ont des points d'interrogation dans leurs URLs."
304
+
305
+ #: options.php:375
306
+ msgid ""
307
+ "This option is disabled by default because there is plugins which use\r\n"
308
+ " URL parameter to perform specific action that cannot be cached"
309
+ msgstr ""
310
+ "Cette option est désactivée par défaut car quelques extensions peuvent utiliser\r\n"
311
+ " le paramétrage d'URL pour des actions spécifiques qui ne peuvent être mises en cache"
312
+
313
+ #: options.php:377
314
+ msgid ""
315
+ "For who is using search engines friendly permalink format is safe to\r\n"
316
+ " leave this option disabled, no performances will be lost."
317
+ msgstr ""
318
+ "Pour celui qui utilise un moteur de recherche utilisant les permaliens doit\r\n"
319
+ " laisser cette option désactivée, aucune performance ne sera perdue."
320
+
321
+ #: options.php:392
322
+ msgid "URI to reject"
323
+ msgstr "URI à rejeter"
324
+
325
+ #: options.php:396
326
+ msgid "Write one URI per line, each URI has to start with a slash."
327
+ msgstr "Ecrire un URI par ligne, chaque URI doit commencer par un slash."
328
+
329
+ #: options.php:397
330
+ msgid "A specified URI will match the requested URI if the latter starts with the former."
331
+ msgstr "Un URI spécifié correspondra à une requête URI si le nouveau démarre avec l'ancien."
332
+
333
+ #: options.php:398
334
+ msgid "If you want to specify a stric matching, surround the URI with double quotes."
335
+ msgstr "Si vous voulez spécifier une correspondance de stric, entourer l'URI de doubles guillemets."
336
+
337
+ #: options.php:418
338
+ msgid "Agents to reject"
339
+ msgstr "Agents à rejeter"
340
+
341
+ #: options.php:422
342
+ msgid "Write one agent per line."
343
+ msgstr "Ecrire un agent par ligne."
344
+
345
+ #: options.php:423
346
+ msgid "A specified agent will match the client agent if the latter contains the former. The matching is case insensitive."
347
+ msgstr "Un agent spécifié correspondra au client agent si le dernier contient l'ancien. La correspondance est insensible à la case."
348
+
349
+ #: options.php:429
350
+ msgid "Cookies matching"
351
+ msgstr "Correspondance des cookies"
352
+
353
+ #: options.php:433
354
+ msgid "Write one cookie name per line."
355
+ msgstr "Ecrire un nom de cookie par ligne."
356
+
357
+ #: options.php:434
358
+ msgid "When a specified cookie will match one of the cookie names sent bby the client the cache stops."
359
+ msgstr "Lorsqu'un cookie spécifié correspondra à l'un des noms de cookies envoyé par le client, le cache se stoppe."
360
+
361
+ #: options.php:437
362
+ msgid ""
363
+ "It seems you have Facebook Connect plugin installed. Add this cookie name to make it works\r\n"
364
+ " with Hyper Cache:"
365
+ msgstr ""
366
+ "Il semblerait que vous avez l'extension Facebook Connect installée. Ajoutez ce nom de cookie pour le faire fonctionner\r\n"
367
+ " avec Hyper Cache :"
368
+
hyper-cache-ru_RU.mo ADDED
Binary file
hyper-cache-ru_RU.po ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # This file is put in the public domain.
3
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Hyper Cache 2.8.5\n"
8
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
9
+ "POT-Creation-Date: 2009-09-29 15:57+0000\n"
10
+ "PO-Revision-Date: 2011-08-20 22:14+0300\n"
11
+ "Last-Translator: mckryak <mckryak@freemail.ru>\n"
12
+ "Language-Team: \n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Poedit-Language: Russian\n"
17
+ "X-Poedit-Country: RUSSIAN FEDERATION\n"
18
+
19
+ #: options.php:68
20
+ #, php-format
21
+ msgid ""
22
+ "You can find more details about configurations and working mode\r\n"
23
+ " on <a href=\"%s\">Hyper Cache official page</a>."
24
+ msgstr "Вы можете подробнее узнать о настройке плагина и его режимах работы на <a href=\"%s\">официальном сайте Hyper Cache</a>."
25
+
26
+ #: options.php:74
27
+ msgid "Other interesting plugins:"
28
+ msgstr "Другие интересные плагины:"
29
+
30
+ #: options.php:84
31
+ msgid "Cache status"
32
+ msgstr "Состояние кэша"
33
+
34
+ #: options.php:87
35
+ msgid "Files in cache (valid and expired)"
36
+ msgstr "Файлы в кэше (актуальные и устаревшие)"
37
+
38
+ #: options.php:92
39
+ msgid "Clean the cache"
40
+ msgstr "Очистить кэш"
41
+
42
+ #: options.php:96
43
+ msgid "Statistics"
44
+ msgstr "Статистика"
45
+
46
+ #: options.php:100
47
+ msgid "Enable statistics collection"
48
+ msgstr "Включить сбор статистики"
49
+
50
+ #: options.php:104
51
+ msgid ""
52
+ "Very experimental and not really efficient,\r\n"
53
+ " but can be useful to check how the cache works."
54
+ msgstr "Экспериментальная и неэффективная функция, но может быть полена для проверки работы кэша."
55
+
56
+ #: options.php:106
57
+ msgid ""
58
+ "Many .txt files willbe created inside the wp-content folder,\r\n"
59
+ " you can safely delete them if you need."
60
+ msgstr "В папке wp-content будет создано много файлов .txt. Если потребуется, их можно безопасно удалить."
61
+
62
+ #: options.php:125
63
+ msgid ""
64
+ "Below are statitics about requests Hyper Cache can handle and the ratio between the\r\n"
65
+ "requests served by Hyper Cache and the ones served by WordPress."
66
+ msgstr "Ниже показана статистика запросов, обработанных Hyper Cache, и отношение запросов, обработанных Hyper Cache и WordPress."
67
+
68
+ #: options.php:128
69
+ msgid ""
70
+ "Requests that bypass the cache due to configurations are not counted because they are\r\n"
71
+ "explicitely not cacheable."
72
+ msgstr "Запросы, пропускаемые кэшем в соответствии с конфигурацией, не учитываются, поскольку явно отмечены некэшируемыми."
73
+
74
+ #: options.php:136
75
+ msgid "Detailed data broken up on different types of cache hits"
76
+ msgstr "Детальная информация, разнесенная по типам совпадений"
77
+
78
+ #: options.php:149
79
+ #: options.php:233
80
+ #: options.php:259
81
+ #: options.php:298
82
+ #: options.php:404
83
+ msgid "Update"
84
+ msgstr "Обновление"
85
+
86
+ #: options.php:152
87
+ msgid "Configuration"
88
+ msgstr "Конфигурация"
89
+
90
+ #: options.php:157
91
+ msgid "Cached pages timeout"
92
+ msgstr "Таймаут кэшированных страниц"
93
+
94
+ #: options.php:160
95
+ #: options.php:174
96
+ msgid "minutes"
97
+ msgstr "минут"
98
+
99
+ #: options.php:162
100
+ msgid ""
101
+ "Minutes a cached page is valid and served to users. A zero value means a cached page is\r\n"
102
+ " valid forever."
103
+ msgstr "Время, в течение которого кэшированная страница считается действительной. Укажите значение 0 (ноль), чтобы страницы считались действительными вечно."
104
+
105
+ #: options.php:164
106
+ msgid ""
107
+ "If a cached page is older than specified value (expired) it is no more used and\r\n"
108
+ " will be regenerated on next request of it."
109
+ msgstr "Если кэшированная страница старее указанного значения (т.е. устарела), она будет перегенерирована при следующем обращении к ней."
110
+
111
+ #: options.php:166
112
+ msgid "720 minutes is half a day, 1440 is a full day and so on."
113
+ msgstr "Например, 720 минут — половина суток, 1440 — полные сутки."
114
+
115
+ #: options.php:171
116
+ msgid "Cache autoclean"
117
+ msgstr "Автоочистка кэша"
118
+
119
+ #: options.php:176
120
+ msgid ""
121
+ "Frequency of the autoclean process which removes to expired cached pages to free\r\n"
122
+ " disk space."
123
+ msgstr "Частота автоматической очистки кэша — удаления устаревших страниц для освобождения дискового пространства."
124
+
125
+ #: options.php:178
126
+ msgid ""
127
+ "Set lower or equals of timeout above. If set to zero the autoclean process never\r\n"
128
+ " runs."
129
+ msgstr "Установите значение меньшее или равное таймауту. Если указать 0 (ноль), автоматическая очистка будет отключена."
130
+
131
+ #: options.php:180
132
+ msgid ""
133
+ "There is no performance improvements setting to zero, worse the cache folder will fill up\r\n"
134
+ " being slower."
135
+ msgstr "Установка нулевого значения не улучшает производительность, но кэш будет занимать больше места."
136
+
137
+ #: options.php:182
138
+ msgid "If timeout is set to zero, autoclean never runs, so this value has no meaning"
139
+ msgstr "Если таймаут установлен в ноль, автоматическая очистка не будет выполняться, так что это значение ни на что не влияет."
140
+
141
+ #: options.php:187
142
+ msgid "Cache invalidation mode"
143
+ msgstr "Режим аннулирования кэша"
144
+
145
+ #: options.php:190
146
+ msgid "All cached pages"
147
+ msgstr "Все кэшированные страницы"
148
+
149
+ #: options.php:191
150
+ msgid "Only modified posts"
151
+ msgstr "Только измененные записи"
152
+
153
+ #: options.php:192
154
+ msgid "Only modified pages"
155
+ msgstr "Только измененные страницы"
156
+
157
+ #: options.php:193
158
+ msgid "Nothing"
159
+ msgstr "Ничего"
160
+
161
+ #: options.php:197
162
+ msgid "Invalidate home, archives, categories on single post invalidation"
163
+ msgstr "При аннулировании записи также аннулировать домашнюю страницу, страницы архивов и категорий"
164
+
165
+ #: options.php:200
166
+ msgid "\"Invalidation\" is the process of deleting cached pages when they are no more valid."
167
+ msgstr "«Аннулирование» — процесс удаления страниц из кэша, когда они устаревают."
168
+
169
+ #: options.php:201
170
+ msgid ""
171
+ "Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so\r\n"
172
+ " one or more cached pages need to be refreshed to get that new content."
173
+ msgstr "Процесс аннулирования запускается при изменении содержимого блога (новая запись, изменение записи, размещение комментария...), после чего одна или несколько страниц в кэше должны быть заменены новыми."
174
+
175
+ #: options.php:203
176
+ msgid ""
177
+ "A new comment submission or a comment moderation is considered like a post modification\r\n"
178
+ " where the post is the one the comment is relative to."
179
+ msgstr "Размещение или модерация комментария учитывается аналогично изменению записи, к которой этот комментарий относится."
180
+
181
+ #: options.php:209
182
+ msgid "Disable cache for commenters"
183
+ msgstr "Отключить кэш для комментаторов"
184
+
185
+ #: options.php:213
186
+ msgid ""
187
+ "When users leave comments, WordPress show pages with their comments even if in moderation\r\n"
188
+ " (and not visible to others) and pre-fills the comment form."
189
+ msgstr "Когда пользователь оставляет комментарий, WordPress показывает ему страницу с этим комментарием, даже если он отправлен на премодерацию и не виден другим пользователям."
190
+
191
+ #: options.php:215
192
+ msgid "If you want to keep those features, enable this option."
193
+ msgstr "Поставьте метку, если хотите сохранить эту функцию."
194
+
195
+ #: options.php:216
196
+ msgid "The caching system will be less efficient but the blog more usable."
197
+ msgstr "Кэширование будет менее эффективным, но блог — более удобным."
198
+
199
+ #: options.php:222
200
+ msgid "Feeds caching"
201
+ msgstr "Кэширование RSS"
202
+
203
+ #: options.php:226
204
+ msgid "When enabled the blog feeds will be cache as well."
205
+ msgstr "Если включить, RSS-потоки блога также будут кэшироваться. "
206
+
207
+ #: options.php:227
208
+ msgid ""
209
+ "Usually this options has to be left unchecked but if your blog is rather static,\r\n"
210
+ " you can enable it and have a bit more efficiency"
211
+ msgstr "Обычно включать не требуется, но, если блог почти не меняется, эта функция сделает его чуть более эффективным."
212
+
213
+ #: options.php:236
214
+ msgid "Configuration for mobile devices"
215
+ msgstr "Конфигурация для мобильных устройств"
216
+
217
+ #: options.php:239
218
+ msgid "Detect mobile devices"
219
+ msgstr "Определять мобильные устройства"
220
+
221
+ #: options.php:243
222
+ msgid "When enabled mobile devices will be detected and the cached page stored under different name."
223
+ msgstr "Если включить, мобильные устройства будут определяться, и страницы для них — кэшироваться под другими именами."
224
+
225
+ #: options.php:244
226
+ msgid "This makes blogs with different themes for mobile devices to work correctly."
227
+ msgstr "Это позволит корректно работать блогу с особыми темами для мобильных устройств."
228
+
229
+ #: options.php:249
230
+ msgid "Mobile agent list"
231
+ msgstr "Список мобильных агентов"
232
+
233
+ #: options.php:253
234
+ msgid "One per line mobile agents to check for when a page is requested."
235
+ msgstr "Список мобильных агентов по одному на строке."
236
+
237
+ #: options.php:254
238
+ msgid "The mobile agent string is matched against the agent a device is sending to the server."
239
+ msgstr "Строки проверяются на совпадение со значением «agent», переданным устройством серверу."
240
+
241
+ #: options.php:263
242
+ msgid "Compression"
243
+ msgstr "Сжатие"
244
+
245
+ #: options.php:267
246
+ msgid "Your hosting space has not the \"gzencode\" or \"gzinflate\" function, so no compression options are available."
247
+ msgstr "На вашем хостинге нет функций «gzencode» или «gzinflate», поэтому сжатие недоступно."
248
+
249
+ #: options.php:273
250
+ msgid "Enable compression"
251
+ msgstr "Включить сжатие"
252
+
253
+ #: options.php:277
254
+ msgid "When possible the page will be sent compressed to save bandwidth."
255
+ msgstr "По возможности страницы будут отправляться сжатыми для экономии трафика."
256
+
257
+ #: options.php:278
258
+ msgid ""
259
+ "Only the textual part of a page can be compressed, not images, so a photo\r\n"
260
+ " blog will consume a lot of bandwidth even with compression enabled."
261
+ msgstr "Сжата может быть только текстовая часть страницы, поэтому фотоблог требует передачи значительного объема данных даже при включенном сжатии."
262
+
263
+ #: options.php:280
264
+ #: options.php:293
265
+ msgid "Leave the options disabled if you note malfunctions, like blank pages."
266
+ msgstr "Оставьте отключенной, если замечаете неправильную работу, например, пустые страницы."
267
+
268
+ #: options.php:282
269
+ msgid "If you enable this option, the option below will be enabled as well."
270
+ msgstr "Если включена, будет включена и следующая опция."
271
+
272
+ #: options.php:287
273
+ msgid "Disk space usage"
274
+ msgstr "Использование дискового пространства"
275
+
276
+ #: options.php:291
277
+ msgid "Enable this option to minimize disk space usage."
278
+ msgstr "Включите для экономии дискового пространства."
279
+
280
+ #: options.php:292
281
+ msgid "The cache will be a little less performant."
282
+ msgstr "Кэширование будет несколько менее производительным."
283
+
284
+ #: options.php:303
285
+ msgid "Advanced options"
286
+ msgstr "Экспертные настройки"
287
+
288
+ #: options.php:307
289
+ msgid "Translation"
290
+ msgstr "Перевод"
291
+
292
+ #: options.php:311
293
+ msgid "DO NOT show this panel translated."
294
+ msgstr "НЕ ПЕРЕВОДИТЬ эту страницу."
295
+
296
+ #: options.php:316
297
+ msgid "Home caching"
298
+ msgstr "Кэширование Домашней"
299
+
300
+ #: options.php:320
301
+ msgid "DO NOT cache the home page so it is always fresh."
302
+ msgstr "НЕ КЭШИРОВАТЬ домашнюю страницу."
303
+
304
+ #: options.php:325
305
+ msgid "Redirect caching"
306
+ msgstr "Кэширование перенаправлений"
307
+
308
+ #: options.php:329
309
+ msgid "Cache WordPress redirects."
310
+ msgstr "Кэшировать перенаправления WordPress."
311
+
312
+ #: options.php:330
313
+ msgid "WordPress sometime sends back redirects that can be cached to avoid further processing time."
314
+ msgstr "WordPress иногда передает перенаправление (redirect). Их можно кэшировать, чтобы избегать затрат времени на обработку."
315
+
316
+ #: options.php:335
317
+ msgid "URL with parameters"
318
+ msgstr "URL с параметрами"
319
+
320
+ #: options.php:339
321
+ msgid "Cache requests with query string (parameters)."
322
+ msgstr "Кэшировать запросы с параметрами."
323
+
324
+ #: options.php:340
325
+ msgid "This option has to be enabled for blogs which have post URLs with a question mark on them."
326
+ msgstr "Включается для блогов, где записи имеют адреса (URL) со знаком вопроса в них."
327
+
328
+ #: options.php:341
329
+ msgid ""
330
+ "This option is disabled by default because there is plugins which use\r\n"
331
+ " URL parameter to perform specific action that cannot be cached"
332
+ msgstr "По умолчанию отключено, т.к. существуют плагины, использующие параметры URL для выполнения специфических действий. Их кэшировать нельзя."
333
+
334
+ #: options.php:343
335
+ msgid ""
336
+ "For who is using search engines friendly permalink format is safe to\r\n"
337
+ " leave this option disabled, no performances will be lost."
338
+ msgstr "При использовании «читаемого» формата постоянных ссылок эту опцию можно безопасно отключить. Потерь производительности не будет."
339
+
340
+ #: options.php:349
341
+ msgid "URI to reject"
342
+ msgstr "Исключаемые URI"
343
+
344
+ #: options.php:353
345
+ msgid "Write one URI per line, each URI has to start with a slash."
346
+ msgstr "Записывается по одному URI на строку, каждый URI — начиная со слеша (/)."
347
+
348
+ #: options.php:354
349
+ msgid "A specified URI will match the requested URI if the latter starts with the former."
350
+ msgstr "Указанные URI будут сравниваться с запрашиваемыми URI (по условию «начинается с»)."
351
+
352
+ #: options.php:355
353
+ msgid "If you want to specify a stric matching, surround the URI with double quotes."
354
+ msgstr "Если требуется строгое соответствие, заключите URI в двойные кавычки (\"...\")."
355
+
356
+ #: options.php:374
357
+ msgid "Agents to reject"
358
+ msgstr "Исключаемые агенты"
359
+
360
+ #: options.php:378
361
+ msgid "Write one agent per line."
362
+ msgstr "Записываются по одному имени на строке."
363
+
364
+ #: options.php:379
365
+ msgid "A specified agent will match the client agent if the latter contains the former. The matching is case insensitive."
366
+ msgstr "Проверяется вхождение указанных строк в значение Agent (без учета регистра). "
367
+
368
+ #: options.php:384
369
+ msgid "Cookies matching"
370
+ msgstr "Совпадение Cookies"
371
+
372
+ #: options.php:388
373
+ msgid "Write one cookie name per line."
374
+ msgstr "По одной записи на строке."
375
+
376
+ #: options.php:389
377
+ msgid "When a specified cookie will match one of the cookie names sent bby the client the cache stops."
378
+ msgstr "Если указанная строка совпадает с одним из имен Cookies, переданных клиентом, кэш останавливается."
379
+
380
+ #: options.php:392
381
+ msgid ""
382
+ "It seems you have Facebook Connect plugin installed. Add this cookie name to make it works\r\n"
383
+ " with Hyper Cache:"
384
+ msgstr "Похоже, у вас установлен плагин Facebook Connect. Добавьте следующее имя, чтобы он работал с Hyper Cache:"
385
+
386
+ #: plugin.php:120
387
+ msgid "Settings"
388
+ msgstr "Настройки"
389
+
hyper-cache-zh_CN.mo ADDED
Binary file
hyper-cache-zh_CN.po ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Hyper Cache v2.8.8\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-03-25 12:00+0800\n"
6
+ "PO-Revision-Date: 2012-03-28 18:08+0800\n"
7
+ "Last-Translator: Tommy Tung\n"
8
+ "Language-Team: Ragnarok | ragnarok.3dsydesign.com <ragnarok@3dsydesign.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2\n"
13
+ "X-Poedit-Language: Chinese\n"
14
+ "X-Poedit-Country: CHINA\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: options.php:92
18
+ msgid "You must add to the file wp-config.php (at its beginning after the &lt;?php) the line of code: <code>define('WP_CACHE', true);</code>."
19
+ msgstr "你必须在「wp-config.php」文件里面新增这行代码:<code>define('WP_CACHE', true);</code>(要写在 &lt;?php 之后)。"
20
+
21
+ #: options.php:103
22
+ msgid "<p><strong>Options saved BUT not active because Hyper Cache was not able to update the file wp-content/advanced-cache.php (is it writable?).</strong></p>"
23
+ msgstr "<p><strong>选项已储存但是无法有效激活,因为 Hyper Cache 无法更新「wp-content/advanced-cache.php」这文件(文件是否能够写入?)。</strong></p>"
24
+
25
+ #: options.php:109
26
+ msgid "<p><strong>Hyper Cache was not able to create the folder \"wp-content/cache/hyper-cache\". Make it manually setting permissions to 777.</strong></p>"
27
+ msgstr "<p><strong>Hyper Cache 无法建立「wp-content/cache/hyper-cache」文件夹,请手动设定文件夹权限为 777。</strong></p>"
28
+
29
+ #: options.php:114
30
+ msgid "You can find more details about configurations and working mode on <a href=\"%s\">Hyper Cache official page</a>."
31
+ msgstr "你可以在 <a href=\"%s\">Hyper Cache 官方网页</a> 找到更多关于配置以及工作模式的细节。简体中文语系由 <a href=\"http://ragnarok.3dsydesign.com/\" target=\"_blank\">Ragnarok</a> 翻译而成,你也可以参考 Ragnarok 的 <a href=\"http://ragnarok.3dsydesign.com/38/hyper-cache/\" target=\"_blank\">Hyper Cache 教学</a> 。"
32
+
33
+ #: options.php:123
34
+ msgid "Clear cache"
35
+ msgstr "清除缓存"
36
+
37
+ #: options.php:126
38
+ msgid "Cache status"
39
+ msgstr "缓存状态"
40
+
41
+ #: options.php:129
42
+ msgid "Files in cache (valid and expired)"
43
+ msgstr "缓存的文件数(有效期限内)"
44
+
45
+ #: options.php:133
46
+ msgid "Cleaning process"
47
+ msgstr "清除进程"
48
+
49
+ #: options.php:135
50
+ msgid "Next run on: "
51
+ msgstr "下次执行时间于:"
52
+
53
+ #: options.php:142
54
+ msgid "The cleaning process runs hourly and it's ok to run it hourly: that grant you an efficient cache. If above there is not a valid next run time, wait 10 seconds and reenter this panel. If nothing change, try to deactivate and reactivate Hyper Cache."
55
+ msgstr "清除进程会频繁的进行,而且让清除动作时时进行是很不错的,可以带给你更高效率的缓存。如果上面没有显示有效的下次执行时间,请等待 10 秒钟再重新进入这个面板。如果还是没有任何变化,请试着禁用并重新激活 Hyper Cache。"
56
+
57
+ #: options.php:149
58
+ msgid "Configuration"
59
+ msgstr "配置"
60
+
61
+ #: options.php:154
62
+ msgid "Cached pages timeout"
63
+ msgstr "缓存页面到期时间"
64
+
65
+ #: options.php:157
66
+ msgid "minutes"
67
+ msgstr "分钟"
68
+
69
+ #: options.php:159
70
+ msgid "Minutes a cached page is valid and served to users. A zero value means a cached page is valid forever."
71
+ msgstr "在设定时间内的缓存页面都是有效的,并且提供给用户端使用,数值设为 0 表示缓存的页面永远都不会到期。"
72
+
73
+ #: options.php:161
74
+ msgid "If a cached page is older than specified value (expired) it is no more used and will be regenerated on next request of it."
75
+ msgstr "如果缓存的页面已经比指定的数值更久(已过期)就不会再继续使用,并且会再重新产生下一个请求的缓存页面。"
76
+
77
+ #: options.php:163
78
+ msgid "720 minutes is half a day, 1440 is a full day and so on."
79
+ msgstr "720 分钟是半天,1440 分钟是一整天,其它以此类推。"
80
+
81
+ #: options.php:169
82
+ msgid "Cache invalidation mode"
83
+ msgstr "缓存「失效」模式"
84
+
85
+ #: options.php:172
86
+ msgid "All cached pages"
87
+ msgstr "所有已缓存页面"
88
+
89
+ #: options.php:173
90
+ msgid "Only modified posts"
91
+ msgstr "只有修改后的文章"
92
+
93
+ #: options.php:174
94
+ msgid "Only modified pages"
95
+ msgstr "只有修改后的页面"
96
+
97
+ #: options.php:175
98
+ msgid "Nothing"
99
+ msgstr "无"
100
+
101
+ #: options.php:179
102
+ msgid "Invalidate home, archives, categories on single post invalidation"
103
+ msgstr "只要有单一文章「失效」,就将首页、汇整、分类也一起「失效」。"
104
+
105
+ #: options.php:182
106
+ msgid "\"Invalidation\" is the process of deleting cached pages when they are no more valid."
107
+ msgstr "「失效」指的是当缓存的页面不再有效时删除它们的程序。"
108
+
109
+ #: options.php:183
110
+ msgid "Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so one or more cached pages need to be refreshed to get that new content."
111
+ msgstr "当博客内容被修改时(新增文章、文章更新、新增评论 ... )「失效」的程序就会启动,因此一个或多个缓存页面需要更新以获得新的内容。"
112
+
113
+ #: options.php:185
114
+ msgid "A new comment submission or a comment moderation is considered like a post modification where the post is the one the comment is relative to."
115
+ msgstr "新的评论提交或评论审核通过时,也跟文章经过修改是一样的(内文是文章的一部分,而评论则与内文互相对应)。"
116
+
117
+ #: options.php:192
118
+ msgid "Disable cache for commenters"
119
+ msgstr "禁用评论的缓存"
120
+
121
+ #: options.php:196
122
+ msgid "When users leave comments, WordPress show pages with their comments even if in moderation (and not visible to others) and pre-fills the comment form."
123
+ msgstr "当用户发表评论时,即使评论还在审核中(而且其他人不可见),WordPress 也会先预填评论表格,将他们的留言显示到页面上。"
124
+
125
+ #: options.php:198
126
+ msgid "If you want to keep those features, enable this option."
127
+ msgstr "如果你想要保留这些功能,请激活这个选项。"
128
+
129
+ #: options.php:199
130
+ msgid "The caching system will be less efficient but the blog more usable."
131
+ msgstr "这样做会降低缓存系统的效率,但博客会更便于使用。"
132
+
133
+ #: options.php:206
134
+ msgid "Feeds caching"
135
+ msgstr "RSS 缓存"
136
+
137
+ #: options.php:210
138
+ msgid "When enabled the blog feeds will be cache as well."
139
+ msgstr "当激活后博客的 RSS 也会被缓存。"
140
+
141
+ #: options.php:211
142
+ msgid "Usually this options has to be left unchecked but if your blog is rather static, you can enable it and have a bit more efficiency"
143
+ msgstr "通常这个选项必定是不勾选,不过如果你的博客是比较静态的,你可以激活它来获得一些效率提升。"
144
+
145
+ #: options.php:218
146
+ #: options.php:256
147
+ #: options.php:297
148
+ #: options.php:449
149
+ msgid "Update"
150
+ msgstr "更新"
151
+
152
+ #: options.php:221
153
+ msgid "Configuration for mobile devices"
154
+ msgstr "手机配置"
155
+
156
+ #: options.php:224
157
+ msgid "WordPress Mobile Pack"
158
+ msgstr "WordPress Mobile Pack"
159
+
160
+ #: options.php:228
161
+ msgid "Enbale integration with <a href=\"http://wordpress.org/extend/plugins/wordpress-mobile-pack/\">WordPress Mobile Pack</a> plugin. If you have that plugin, Hyper Cache use it to detect mobile devices and caches saparately the different pages generated."
162
+ msgstr "激活后会整合 <a href=\"http://wordpress.org/extend/plugins/wordpress-mobile-pack/\">WordPress Mobile Pack</a> 插件。如果你有使用这插件,Hyper Cache 会利用它来检测手机,并且在不同页面产生时个别缓存。"
163
+
164
+ #: options.php:234
165
+ msgid "Detect mobile devices"
166
+ msgstr "侦测手机"
167
+
168
+ #: options.php:238
169
+ msgid "When enabled mobile devices will be detected and the cached page stored under different name."
170
+ msgstr "当激活时,手机将会侦测并且将缓存页面存到不同的名称底下。"
171
+
172
+ #: options.php:239
173
+ msgid "This makes blogs with different themes for mobile devices to work correctly."
174
+ msgstr "这让那些使用手机访问时会采用不同布景主题的博客也能够正常工作。"
175
+
176
+ #: options.php:245
177
+ msgid "Mobile agent list"
178
+ msgstr "行动代理商清单"
179
+
180
+ #: options.php:249
181
+ msgid "One per line mobile agents to check for when a page is requested."
182
+ msgstr "当请求页面时,会逐行检查每一个行动代理商。"
183
+
184
+ #: options.php:250
185
+ msgid "The mobile agent string is matched against the agent a device is sending to the server."
186
+ msgstr "行动代理商的字串符合时,会将相对的代理商装置传送到服务器。"
187
+
188
+ #: options.php:260
189
+ msgid "Compression"
190
+ msgstr "压缩"
191
+
192
+ #: options.php:264
193
+ msgid "Your hosting space has not the \"gzencode\" or \"gzinflate\" function, so no compression options are available."
194
+ msgstr "你的 Host 主机没有「gzencode」或「gzinflate」功能,所以没有可以使用的压缩选项。"
195
+
196
+ #: options.php:270
197
+ msgid "Enable compression"
198
+ msgstr "激活压缩"
199
+
200
+ #: options.php:274
201
+ msgid "When possible the page will be sent compressed to save bandwidth."
202
+ msgstr "当选项可用时,会进行页面压缩以节省带宽。"
203
+
204
+ #: options.php:275
205
+ msgid "Only the textual part of a page can be compressed, not images, so a photo blog will consume a lot of bandwidth even with compression enabled."
206
+ msgstr "只有页面的文字部分可以被压缩而不是图片,因此以照片为主的博客即使激活压缩,也还是会消耗大量带宽。"
207
+
208
+ #: options.php:277
209
+ #: options.php:291
210
+ msgid "Leave the options disabled if you note malfunctions, like blank pages."
211
+ msgstr "如果你很在意会发生故障(如空白页)的话,请保留此选项禁用。"
212
+
213
+ #: options.php:279
214
+ msgid "If you enable this option, the option below will be enabled as well."
215
+ msgstr "如果你激活这选项,底下的选项也同样会激活。"
216
+
217
+ #: options.php:285
218
+ msgid "Disk space usage"
219
+ msgstr "硬盘空间使用情况"
220
+
221
+ #: options.php:289
222
+ msgid "Enable this option to minimize disk space usage."
223
+ msgstr "激活此选项来最大限度地减少硬盘空间使用情况,"
224
+
225
+ #: options.php:290
226
+ msgid "The cache will be a little less performant."
227
+ msgstr "会稍微减少一些缓存的性能。"
228
+
229
+ #: options.php:302
230
+ msgid "Advanced options"
231
+ msgstr "进阶选项"
232
+
233
+ #: options.php:306
234
+ msgid "Translation"
235
+ msgstr "翻译"
236
+
237
+ #: options.php:310
238
+ msgid "DO NOT show this panel translated."
239
+ msgstr "不显示 Hyper Cache 选项面板的翻译。"
240
+
241
+ #: options.php:316
242
+ msgid "Disable Last-Modified header"
243
+ msgstr "禁用「页首 Last-Modified」"
244
+
245
+ #: options.php:320
246
+ msgid "Disable some HTTP headers (Last-Modified) which improve performances but some one is reporting they create problems which some hosting configurations."
247
+ msgstr "禁用一些 HTTP 页首属性(Last-Modified)可以增进效能,不过有些人反映说一些 Host 主机商的配置会产生问题。"
248
+
249
+ #: options.php:326
250
+ msgid "Home caching"
251
+ msgstr "「首页」缓存"
252
+
253
+ #: options.php:330
254
+ msgid "DO NOT cache the home page so it is always fresh."
255
+ msgstr "不缓存首页,因此首页总是保持最新状态。"
256
+
257
+ #: options.php:336
258
+ msgid "Redirect caching"
259
+ msgstr "「重定向」缓存"
260
+
261
+ #: options.php:340
262
+ msgid "Cache WordPress redirects."
263
+ msgstr "缓存 WordPress 的重定向。"
264
+
265
+ #: options.php:341
266
+ msgid "WordPress sometime sends back redirects that can be cached to avoid further processing time."
267
+ msgstr "WordPress 有时会回传重定向,可以把这里缓存以避免增加处理的时间。"
268
+
269
+ #: options.php:346
270
+ msgid "Page not found caching (HTTP 404)"
271
+ msgstr "「找不到网页」缓存 (404 错误)"
272
+
273
+ #: options.php:353
274
+ msgid "Strip query string"
275
+ msgstr "从查询字串中删除不必要内容"
276
+
277
+ #: options.php:357
278
+ msgid "This is a really special case, usually you have to kept it disabled. When enabled, URL with query string will be reduced removing the query string. So the URL http://www.domain.com/post-title and http://www.domain.com/post-title?a=b&amp;c=d are cached as a single page.<br />Setting this option disable the next one."
279
+ msgstr "这是一个非常特殊的情况,通常你必须保持选项禁用。当激活后,带有查询字串的网址将会缩减和移除查询字串。因此网址例如「http://www.domain.com/post-title」和「http://www.domain.com/post-title?a=b&amp;c=d」都会缓存到同一个页面。<br />设定(激活)这个选项时要禁用下一个选项。"
280
+
281
+ #: options.php:362
282
+ msgid "<strong>Many plugins can stop to work correctly with this option enabled (eg. my <a href=\"http://www.satollo.net/plugins/newsletter\">Newsletter plugin</a>)</strong>"
283
+ msgstr "<strong>激活这个选项可能会阻挡许多插件的正确运作(例如:我的 <a href=\"http://www.satollo.net/plugins/newsletter\">Newsletter 插件</a>)。</strong>"
284
+
285
+ #: options.php:369
286
+ msgid "URL with parameters"
287
+ msgstr "带参数的网址"
288
+
289
+ #: options.php:373
290
+ msgid "Cache requests with query string (parameters)."
291
+ msgstr "带有查询字串(参数)的缓存请求。"
292
+
293
+ #: options.php:374
294
+ msgid "This option has to be enabled for blogs which have post URLs with a question mark on them."
295
+ msgstr "对于那些文章网址上面带有问号的博客,激活这个选项是必要的。"
296
+
297
+ #: options.php:375
298
+ msgid "This option is disabled by default because there is plugins which use URL parameter to perform specific action that cannot be cached"
299
+ msgstr "这个选项预设为禁用,因为有一些插件使用网址参数来执行无法被缓存的特殊操作。"
300
+
301
+ #: options.php:377
302
+ msgid "For who is using search engines friendly permalink format is safe to leave this option disabled, no performances will be lost."
303
+ msgstr "对于那些使用对搜寻引擎友好的固定网址格式的人来说,禁用这个选项是无害的,不会有效能上的任何损失。"
304
+
305
+ #: options.php:385
306
+ msgid "Filters"
307
+ msgstr "过滤"
308
+
309
+ #: options.php:387
310
+ msgid "Here you can: exclude pages and posts from the cache, specifying their address (URI); disable Hyper Cache for specific User Agents (browsers, bot, mobile devices, ...); disable the cache for users that have specific cookies."
311
+ msgstr "这里你可以:经由指定位址(URI),从缓存中排除这些页面和文章;对特定的「用户代理」禁用 Hyper Cache(浏览器、机器人、手机 ... );对那些有特定 Cookie 的用户禁用缓存。"
312
+
313
+ #: options.php:392
314
+ msgid "URI to reject"
315
+ msgstr "拒绝的位址"
316
+
317
+ #: options.php:396
318
+ msgid "Write one URI per line, each URI has to start with a slash."
319
+ msgstr "每行写一个位址,每个位址必须以斜线开头(例如 /video/my-new-performance)。"
320
+
321
+ #: options.php:397
322
+ msgid "A specified URI will match the requested URI if the latter starts with the former."
323
+ msgstr "如果请求的位址是以上面这些指定的「拒绝的位址」开头,就从缓存中排除这些位址。"
324
+
325
+ #: options.php:398
326
+ msgid "If you want to specify a stric matching, surround the URI with double quotes."
327
+ msgstr "如果你想指定一个比较严谨的符合,请在位址前后加上双引号。"
328
+
329
+ #: options.php:418
330
+ msgid "Agents to reject"
331
+ msgstr "拒绝的代理"
332
+
333
+ #: options.php:422
334
+ msgid "Write one agent per line."
335
+ msgstr "每行写一个代理。"
336
+
337
+ #: options.php:423
338
+ msgid "A specified agent will match the client agent if the latter contains the former. The matching is case insensitive."
339
+ msgstr "如果代理用户端(User-Agent)包含在上面这些指定的「拒绝的代理」里面,就禁用缓存 。(名称不分大小写)"
340
+
341
+ #: options.php:429
342
+ msgid "Cookies matching"
343
+ msgstr "符合的 Cookies"
344
+
345
+ #: options.php:433
346
+ msgid "Write one cookie name per line."
347
+ msgstr "每行写一个 Cookie 的名称。"
348
+
349
+ #: options.php:434
350
+ msgid "When a specified cookie will match one of the cookie names sent bby the client the cache stops."
351
+ msgstr "当用户的 Cookie 符合上面这些指定的 Cookie 名称其中之一时,就会停止对用户端的缓存。"
352
+
353
+ #: options.php:437
354
+ msgid "It seems you have Facebook Connect plugin installed. Add this cookie name to make it works with Hyper Cache:"
355
+ msgstr "你似乎有安装 Facebook Connect 插件,新增这个 Cookie 名称让 Hyper Cache 能够正常运作:"
356
+
357
+ #. Description of the plugin/theme
358
+ msgid "Hyper Cache is a cache system for WordPress to improve it's perfomances and save resources. <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">Hyper Cache official page</a>. To manually upgrade remember the sequence: deactivate, update, reactivate."
359
+ msgstr "Hyper Cache 是用来提升 WordPress 效能以及节省系统资源的缓存系统。<a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">Hyper Cache 官方网页</a>,手动升级请记得这些顺序:禁用、更新、激活。|简体中文语系:<a href=\"http://ragnarok.3dsydesign.com/\" target=\"_blank\">Ragnarok</a>|教学:<a href=\"http://ragnarok.3dsydesign.com/38/hyper-cache/\" target=\"_blank\">Hyper Cache 教学</a>"
360
+
hyper-cache-zh_TW.mo ADDED
Binary file
hyper-cache-zh_TW.po ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Hyper Cache v2.8.8\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-03-25 12:00+0800\n"
6
+ "PO-Revision-Date: 2012-03-28 18:08+0800\n"
7
+ "Last-Translator: Tommy Tung\n"
8
+ "Language-Team: Ragnarok | ragnarok.3dsydesign.com <ragnarok@3dsydesign.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2\n"
13
+ "X-Poedit-Language: Chinese\n"
14
+ "X-Poedit-Country: TAIWAN\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: options.php:92
18
+ msgid "You must add to the file wp-config.php (at its beginning after the &lt;?php) the line of code: <code>define('WP_CACHE', true);</code>."
19
+ msgstr "你必須在「wp-config.php」檔案裡面新增這行程式碼:<code>define('WP_CACHE', true);</code>(要寫在 &lt;?php 之後)。"
20
+
21
+ #: options.php:103
22
+ msgid "<p><strong>Options saved BUT not active because Hyper Cache was not able to update the file wp-content/advanced-cache.php (is it writable?).</strong></p>"
23
+ msgstr "<p><strong>選項已儲存但是無法有效啟用,因為 Hyper Cache 無法更新「wp-content/advanced-cache.php」這檔案(檔案是否能夠寫入?)。</strong></p>"
24
+
25
+ #: options.php:109
26
+ msgid "<p><strong>Hyper Cache was not able to create the folder \"wp-content/cache/hyper-cache\". Make it manually setting permissions to 777.</strong></p>"
27
+ msgstr "<p><strong>Hyper Cache 無法建立「wp-content/cache/hyper-cache」資料夾,請手動設定資料夾權限為 777。</strong></p>"
28
+
29
+ #: options.php:114
30
+ msgid "You can find more details about configurations and working mode on <a href=\"%s\">Hyper Cache official page</a>."
31
+ msgstr "你可以在 <a href=\"%s\">Hyper Cache 官方網頁</a> 找到更多關於配置以及工作模式的細節。繁體中文語系由 <a href=\"http://ragnarok.3dsydesign.com/\" target=\"_blank\">Ragnarok</a> 翻譯而成,你也可以參考 Ragnarok 的 <a href=\"http://ragnarok.3dsydesign.com/38/hyper-cache/\" target=\"_blank\">Hyper Cache 教學</a> 。"
32
+
33
+ #: options.php:123
34
+ msgid "Clear cache"
35
+ msgstr "清除快取"
36
+
37
+ #: options.php:126
38
+ msgid "Cache status"
39
+ msgstr "快取狀態"
40
+
41
+ #: options.php:129
42
+ msgid "Files in cache (valid and expired)"
43
+ msgstr "快取的檔案數(有效期限內)"
44
+
45
+ #: options.php:133
46
+ msgid "Cleaning process"
47
+ msgstr "清除過程"
48
+
49
+ #: options.php:135
50
+ msgid "Next run on: "
51
+ msgstr "下次執行時間於:"
52
+
53
+ #: options.php:142
54
+ msgid "The cleaning process runs hourly and it's ok to run it hourly: that grant you an efficient cache. If above there is not a valid next run time, wait 10 seconds and reenter this panel. If nothing change, try to deactivate and reactivate Hyper Cache."
55
+ msgstr "清除過程會頻繁的進行,而且讓清除動作時時進行是很不錯的,可以帶給你更高效率的快取。如果上面沒有顯示有效的下次執行時間,請等待 10 秒鐘再重新進入這個面板。如果還是沒有任何變化,請試著停用並重新啟用 Hyper Cache。"
56
+
57
+ #: options.php:149
58
+ msgid "Configuration"
59
+ msgstr "配置"
60
+
61
+ #: options.php:154
62
+ msgid "Cached pages timeout"
63
+ msgstr "快取頁面到期時間"
64
+
65
+ #: options.php:157
66
+ msgid "minutes"
67
+ msgstr "分鐘"
68
+
69
+ #: options.php:159
70
+ msgid "Minutes a cached page is valid and served to users. A zero value means a cached page is valid forever."
71
+ msgstr "在設定時間內的快取頁面都是有效的,並且提供給客戶端使用,數值設為 0 表示快取的頁面永遠都不會到期。"
72
+
73
+ #: options.php:161
74
+ msgid "If a cached page is older than specified value (expired) it is no more used and will be regenerated on next request of it."
75
+ msgstr "如果快取的頁面已經比指定的數值更久(已過期)就不會再繼續使用,並且會再重新產生下一個請求的快取頁面。"
76
+
77
+ #: options.php:163
78
+ msgid "720 minutes is half a day, 1440 is a full day and so on."
79
+ msgstr "720 分鐘是半天,1440 分鐘是一整天,其它以此類推。"
80
+
81
+ #: options.php:169
82
+ msgid "Cache invalidation mode"
83
+ msgstr "快取「失效」模式"
84
+
85
+ #: options.php:172
86
+ msgid "All cached pages"
87
+ msgstr "所有已快取頁面"
88
+
89
+ #: options.php:173
90
+ msgid "Only modified posts"
91
+ msgstr "只有修改後的文章"
92
+
93
+ #: options.php:174
94
+ msgid "Only modified pages"
95
+ msgstr "只有修改後的頁面"
96
+
97
+ #: options.php:175
98
+ msgid "Nothing"
99
+ msgstr "無"
100
+
101
+ #: options.php:179
102
+ msgid "Invalidate home, archives, categories on single post invalidation"
103
+ msgstr "只要有單一文章「失效」,就將首頁、彙整、分類也一起「失效」。"
104
+
105
+ #: options.php:182
106
+ msgid "\"Invalidation\" is the process of deleting cached pages when they are no more valid."
107
+ msgstr "「失效」指的是當快取的頁面不再有效時刪除它們的程序。"
108
+
109
+ #: options.php:183
110
+ msgid "Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so one or more cached pages need to be refreshed to get that new content."
111
+ msgstr "當部落格內容被修改時(新增文章、文章更新、新增迴響 ... )「失效」的程序就會啟動,因此一個或多個快取頁面需要重新整理以獲得新的內容。"
112
+
113
+ #: options.php:185
114
+ msgid "A new comment submission or a comment moderation is considered like a post modification where the post is the one the comment is relative to."
115
+ msgstr "新的迴響提交或迴響審核通過時,也跟文章經過修改是一樣的(內文是文章的一部分,而迴響則與內文互相對應)。"
116
+
117
+ #: options.php:192
118
+ msgid "Disable cache for commenters"
119
+ msgstr "停用迴響的快取"
120
+
121
+ #: options.php:196
122
+ msgid "When users leave comments, WordPress show pages with their comments even if in moderation (and not visible to others) and pre-fills the comment form."
123
+ msgstr "當使用者發表迴響時,即使迴響還在審核中(而且其他人不可見),WordPress 也會先預填迴響表格,將他們的留言顯示到頁面上。"
124
+
125
+ #: options.php:198
126
+ msgid "If you want to keep those features, enable this option."
127
+ msgstr "如果你想要保留這些功能,請啟用這個選項。"
128
+
129
+ #: options.php:199
130
+ msgid "The caching system will be less efficient but the blog more usable."
131
+ msgstr "這樣做會降低快取系統的效率,但部落格會更便於使用。"
132
+
133
+ #: options.php:206
134
+ msgid "Feeds caching"
135
+ msgstr "RSS 快取"
136
+
137
+ #: options.php:210
138
+ msgid "When enabled the blog feeds will be cache as well."
139
+ msgstr "當啟用後部落格的 RSS 也會被快取。"
140
+
141
+ #: options.php:211
142
+ msgid "Usually this options has to be left unchecked but if your blog is rather static, you can enable it and have a bit more efficiency"
143
+ msgstr "通常這個選項必定是不勾選,不過如果你的部落格是比較靜態的,你可以啟用它來獲得一些效率提升。"
144
+
145
+ #: options.php:218
146
+ #: options.php:256
147
+ #: options.php:297
148
+ #: options.php:449
149
+ msgid "Update"
150
+ msgstr "更新"
151
+
152
+ #: options.php:221
153
+ msgid "Configuration for mobile devices"
154
+ msgstr "行動裝置配置"
155
+
156
+ #: options.php:224
157
+ msgid "WordPress Mobile Pack"
158
+ msgstr "WordPress Mobile Pack"
159
+
160
+ #: options.php:228
161
+ msgid "Enbale integration with <a href=\"http://wordpress.org/extend/plugins/wordpress-mobile-pack/\">WordPress Mobile Pack</a> plugin. If you have that plugin, Hyper Cache use it to detect mobile devices and caches saparately the different pages generated."
162
+ msgstr "啟用後會整合 <a href=\"http://wordpress.org/extend/plugins/wordpress-mobile-pack/\">WordPress Mobile Pack</a> 外掛。如果你有使用這外掛,Hyper Cache 會利用它來檢測行動裝置,並且在不同頁面產生時個別快取。"
163
+
164
+ #: options.php:234
165
+ msgid "Detect mobile devices"
166
+ msgstr "偵測行動裝置"
167
+
168
+ #: options.php:238
169
+ msgid "When enabled mobile devices will be detected and the cached page stored under different name."
170
+ msgstr "當啟用時,行動裝置將會偵測並且將快取頁面存到不同的名稱底下。"
171
+
172
+ #: options.php:239
173
+ msgid "This makes blogs with different themes for mobile devices to work correctly."
174
+ msgstr "這讓那些使用行動裝置訪問時會採用不同佈景主題的部落格也能夠正常工作。"
175
+
176
+ #: options.php:245
177
+ msgid "Mobile agent list"
178
+ msgstr "行動代理商清單"
179
+
180
+ #: options.php:249
181
+ msgid "One per line mobile agents to check for when a page is requested."
182
+ msgstr "當請求頁面時,會逐行檢查每一個行動代理商。"
183
+
184
+ #: options.php:250
185
+ msgid "The mobile agent string is matched against the agent a device is sending to the server."
186
+ msgstr "行動代理商的字串符合時,會將相對的代理商裝置傳送到伺服器。"
187
+
188
+ #: options.php:260
189
+ msgid "Compression"
190
+ msgstr "壓縮"
191
+
192
+ #: options.php:264
193
+ msgid "Your hosting space has not the \"gzencode\" or \"gzinflate\" function, so no compression options are available."
194
+ msgstr "你的 Host 主機沒有「gzencode」或「gzinflate」功能,所以沒有可以使用的壓縮選項。"
195
+
196
+ #: options.php:270
197
+ msgid "Enable compression"
198
+ msgstr "啟用壓縮"
199
+
200
+ #: options.php:274
201
+ msgid "When possible the page will be sent compressed to save bandwidth."
202
+ msgstr "當選項可用時,會進行頁面壓縮以節省頻寬。"
203
+
204
+ #: options.php:275
205
+ msgid "Only the textual part of a page can be compressed, not images, so a photo blog will consume a lot of bandwidth even with compression enabled."
206
+ msgstr "只有頁面的文字部分可以被壓縮而不是圖片,因此以照片為主的部落格即使啟用壓縮,也還是會消耗大量頻寬。"
207
+
208
+ #: options.php:277
209
+ #: options.php:291
210
+ msgid "Leave the options disabled if you note malfunctions, like blank pages."
211
+ msgstr "如果你很在意會發生故障(如空白頁)的話,請保留此選項停用。"
212
+
213
+ #: options.php:279
214
+ msgid "If you enable this option, the option below will be enabled as well."
215
+ msgstr "如果你啟用這選項,底下的選項也同樣會啟用。"
216
+
217
+ #: options.php:285
218
+ msgid "Disk space usage"
219
+ msgstr "磁碟空間使用情況"
220
+
221
+ #: options.php:289
222
+ msgid "Enable this option to minimize disk space usage."
223
+ msgstr "啟用此選項來最大限度地減少磁碟空間使用情況,"
224
+
225
+ #: options.php:290
226
+ msgid "The cache will be a little less performant."
227
+ msgstr "會稍微減少一些快取的性能。"
228
+
229
+ #: options.php:302
230
+ msgid "Advanced options"
231
+ msgstr "進階選項"
232
+
233
+ #: options.php:306
234
+ msgid "Translation"
235
+ msgstr "翻譯"
236
+
237
+ #: options.php:310
238
+ msgid "DO NOT show this panel translated."
239
+ msgstr "不顯示 Hyper Cache 選項面板的翻譯。"
240
+
241
+ #: options.php:316
242
+ msgid "Disable Last-Modified header"
243
+ msgstr "停用「頁首 Last-Modified」"
244
+
245
+ #: options.php:320
246
+ msgid "Disable some HTTP headers (Last-Modified) which improve performances but some one is reporting they create problems which some hosting configurations."
247
+ msgstr "停用一些 HTTP 頁首屬性(Last-Modified)可以增進效能,不過有些人反映說一些 Host 主機商的配置會產生問題。"
248
+
249
+ #: options.php:326
250
+ msgid "Home caching"
251
+ msgstr "「首頁」快取"
252
+
253
+ #: options.php:330
254
+ msgid "DO NOT cache the home page so it is always fresh."
255
+ msgstr "不快取首頁,因此首頁總是保持最新狀態。"
256
+
257
+ #: options.php:336
258
+ msgid "Redirect caching"
259
+ msgstr "「重定向」快取"
260
+
261
+ #: options.php:340
262
+ msgid "Cache WordPress redirects."
263
+ msgstr "快取 WordPress 的重定向。"
264
+
265
+ #: options.php:341
266
+ msgid "WordPress sometime sends back redirects that can be cached to avoid further processing time."
267
+ msgstr "WordPress 有時會回傳重定向,可以把這裡快取以避免增加處理的時間。"
268
+
269
+ #: options.php:346
270
+ msgid "Page not found caching (HTTP 404)"
271
+ msgstr "「找不到網頁」快取 (404 錯誤)"
272
+
273
+ #: options.php:353
274
+ msgid "Strip query string"
275
+ msgstr "從查詢字串中刪除不必要內容"
276
+
277
+ #: options.php:357
278
+ msgid "This is a really special case, usually you have to kept it disabled. When enabled, URL with query string will be reduced removing the query string. So the URL http://www.domain.com/post-title and http://www.domain.com/post-title?a=b&amp;c=d are cached as a single page.<br />Setting this option disable the next one."
279
+ msgstr "這是一個非常特殊的情況,通常你必須保持選項停用。當啟用後,帶有查詢字串的網址將會縮減和移除查詢字串。因此網址例如「http://www.domain.com/post-title」和「http://www.domain.com/post-title?a=b&amp;c=d」都會快取到同一個頁面。<br />設定(啟用)這個選項時要停用下一個選項。"
280
+
281
+ #: options.php:362
282
+ msgid "<strong>Many plugins can stop to work correctly with this option enabled (eg. my <a href=\"http://www.satollo.net/plugins/newsletter\">Newsletter plugin</a>)</strong>"
283
+ msgstr "<strong>啟用這個選項可能會阻擋許多外掛的正確運作(例如:我的 <a href=\"http://www.satollo.net/plugins/newsletter\">Newsletter 外掛</a>)。</strong>"
284
+
285
+ #: options.php:369
286
+ msgid "URL with parameters"
287
+ msgstr "帶參數的網址"
288
+
289
+ #: options.php:373
290
+ msgid "Cache requests with query string (parameters)."
291
+ msgstr "帶有查詢字串(參數)的快取請求。"
292
+
293
+ #: options.php:374
294
+ msgid "This option has to be enabled for blogs which have post URLs with a question mark on them."
295
+ msgstr "對於那些文章網址上面帶有問號的部落格,啟用這個選項是必要的。"
296
+
297
+ #: options.php:375
298
+ msgid "This option is disabled by default because there is plugins which use URL parameter to perform specific action that cannot be cached"
299
+ msgstr "這個選項預設為停用,因為有一些外掛使用網址參數來執行無法被快取的特殊操作。"
300
+
301
+ #: options.php:377
302
+ msgid "For who is using search engines friendly permalink format is safe to leave this option disabled, no performances will be lost."
303
+ msgstr "對於那些使用對搜尋引擎友好的固定網址格式的人來說,停用這個選項是無害的,不會有效能上的任何損失。"
304
+
305
+ #: options.php:385
306
+ msgid "Filters"
307
+ msgstr "過濾"
308
+
309
+ #: options.php:387
310
+ msgid "Here you can: exclude pages and posts from the cache, specifying their address (URI); disable Hyper Cache for specific User Agents (browsers, bot, mobile devices, ...); disable the cache for users that have specific cookies."
311
+ msgstr "這裡你可以:經由指定位址(URI),從快取中排除這些頁面和文章;對特定的「使用者代理」停用 Hyper Cache(瀏覽器、機器人、行動裝置 ... );對那些有特定 Cookie 的使用者停用快取。"
312
+
313
+ #: options.php:392
314
+ msgid "URI to reject"
315
+ msgstr "拒絕的位址"
316
+
317
+ #: options.php:396
318
+ msgid "Write one URI per line, each URI has to start with a slash."
319
+ msgstr "每行寫一個位址,每個位址必須以斜線開頭(例如 /video/my-new-performance)。"
320
+
321
+ #: options.php:397
322
+ msgid "A specified URI will match the requested URI if the latter starts with the former."
323
+ msgstr "如果請求的位址是以上面這些指定的「拒絕的位址」開頭,就從快取中排除這些位址。"
324
+
325
+ #: options.php:398
326
+ msgid "If you want to specify a stric matching, surround the URI with double quotes."
327
+ msgstr "如果你想指定一個比較嚴謹的符合,請在位址前後加上雙引號。"
328
+
329
+ #: options.php:418
330
+ msgid "Agents to reject"
331
+ msgstr "拒絕的代理"
332
+
333
+ #: options.php:422
334
+ msgid "Write one agent per line."
335
+ msgstr "每行寫一個代理。"
336
+
337
+ #: options.php:423
338
+ msgid "A specified agent will match the client agent if the latter contains the former. The matching is case insensitive."
339
+ msgstr "如果代理用戶端(User-Agent)包含在上面這些指定的「拒絕的代理」裡面,就停用快取 。(名稱不分大小寫)"
340
+
341
+ #: options.php:429
342
+ msgid "Cookies matching"
343
+ msgstr "符合的 Cookies"
344
+
345
+ #: options.php:433
346
+ msgid "Write one cookie name per line."
347
+ msgstr "每行寫一個 Cookie 的名稱。"
348
+
349
+ #: options.php:434
350
+ msgid "When a specified cookie will match one of the cookie names sent bby the client the cache stops."
351
+ msgstr "當使用者的 Cookie 符合上面這些指定的 Cookie 名稱其中之一時,就會停止對客戶端的快取。"
352
+
353
+ #: options.php:437
354
+ msgid "It seems you have Facebook Connect plugin installed. Add this cookie name to make it works with Hyper Cache:"
355
+ msgstr "你似乎有安裝 Facebook Connect 外掛,新增這個 Cookie 名稱讓 Hyper Cache 能夠正常運作:"
356
+
357
+ #. Description of the plugin/theme
358
+ msgid "Hyper Cache is a cache system for WordPress to improve it's perfomances and save resources. <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">Hyper Cache official page</a>. To manually upgrade remember the sequence: deactivate, update, reactivate."
359
+ msgstr "Hyper Cache 是用來提升 WordPress 效能以及節省系統資源的快取系統。<a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">Hyper Cache 官方網頁</a>,手動升級請記得這些順序:停用、更新、啟用。|繁體中文語系:<a href=\"http://ragnarok.3dsydesign.com/\" target=\"_blank\">Ragnarok</a>|教學:<a href=\"http://ragnarok.3dsydesign.com/38/hyper-cache/\" target=\"_blank\">Hyper Cache 教學</a>"
360
+
hyper-cache.pot CHANGED
@@ -1,166 +1,130 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # This file is put in the public domain.
3
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4
- #
5
- #, fuzzy
6
  msgid ""
7
  msgstr ""
8
- "Project-Id-Version: PACKAGE VERSION\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
10
- "POT-Creation-Date: 2009-09-02 10:41+0000\n"
11
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
  "MIME-Version: 1.0\n"
15
- "Content-Type: text/plain; charset=CHARSET\n"
16
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
17
 
18
- #: options.php:160
19
  msgid ""
20
- "Hyper Cache is NOT correctly installed: some files or directories have not "
21
- "been created. Check if the wp-content directory is writable and remove any "
22
- "advanced-cache.php file into it. Deactivate and reactivate the plugin."
23
  msgstr ""
24
 
25
- #: options.php:166
26
  msgid ""
27
- "The WordPress cache system is not enabled! Please, activate it adding the "
28
- "line of code below in the file wp-config.php."
29
  msgstr ""
30
 
31
- #: options.php:172
32
- #, php-format
33
- msgid ""
34
- "<strong>And if this plugin stops to work?</strong><br />Hyper Cache required "
35
- "a lot of effort to be developed and\r\n"
36
- " I'm pretty sure is giving you a good, even if invisible, service.\r\n"
37
- " Probably Hyper Cache makes you save money with your hosting provider "
38
- "using a\r\n"
39
- " basic and cheap hosting plan intead of a bigger and expensive one.\r\n"
40
- " <br />So, why not consider a <a href=\"%s\"><strong>donation</strong></"
41
- "a>?"
42
- msgstr ""
43
-
44
- #: options.php:181
45
- #, php-format
46
  msgid ""
47
- "You can find more details about configurations and working mode\r\n"
48
- " on <a href=\"%s\">Hyper Cache official page</a>."
49
  msgstr ""
50
 
51
- #: options.php:187
52
- msgid "Other interesting plugins:"
 
 
53
  msgstr ""
54
 
55
- #: options.php:197
56
- msgid "Statistics"
57
  msgstr ""
58
 
59
- #: options.php:201
60
- msgid "Enable statistics collection"
61
  msgstr ""
62
 
63
- #: options.php:205
64
- msgid ""
65
- "Very experimental and not really efficient,\r\n"
66
- " but can be useful to check how the cache works."
67
  msgstr ""
68
 
69
- #: options.php:207
70
- msgid ""
71
- "Many .txt files willbe created inside the wp-content folder,\r\n"
72
- " you can safely delete them if you need."
73
  msgstr ""
74
 
75
- #: options.php:226
76
- msgid ""
77
- "Below are statitics about requests Hyper Cache can handle and the ratio "
78
- "between the\r\n"
79
- "requests served by Hyper Cache and the ones served by WordPress."
80
  msgstr ""
81
 
82
- #: options.php:229
83
  msgid ""
84
- "Requests that bypass the cache due to configurations are not counted because "
85
- "they are\r\n"
86
- "explicitely not cacheable."
 
87
  msgstr ""
88
 
89
- #: options.php:237
90
- msgid "Detailed data broken up on different types of cache hits"
91
- msgstr ""
92
-
93
- #: options.php:250 options.php:323 options.php:349 options.php:388
94
- #: options.php:511
95
- msgid "Update"
96
- msgstr ""
97
-
98
- #: options.php:253
99
  msgid "Configuration"
100
  msgstr ""
101
 
102
- #: options.php:258
103
  msgid "Cached pages timeout"
104
  msgstr ""
105
 
106
- #: options.php:261 options.php:274
107
  msgid "minutes"
108
  msgstr ""
109
 
110
- #: options.php:263
111
  msgid ""
112
  "Minutes a cached page is valid and served to users. A zero value means a "
113
  "cached page is\r\n"
114
  " valid forever."
115
  msgstr ""
116
 
117
- #: options.php:265
118
  msgid ""
119
  "If a cached page is older than specified value (expired) it is no more used "
120
  "and\r\n"
121
  " will be regenerated on next request of it."
122
  msgstr ""
123
 
124
- #: options.php:271
125
- msgid "Cache autoclean"
126
- msgstr ""
127
-
128
- #: options.php:276
129
- msgid ""
130
- "Frequency of the autoclean process which removes to expired cached pages to "
131
- "free\r\n"
132
- " disk space. Set lower or equals of timeout above. If set to zero the "
133
- "autoclean process never\r\n"
134
- " runs."
135
  msgstr ""
136
 
137
- #: options.php:283
138
  msgid "Cache invalidation mode"
139
  msgstr ""
140
 
141
- #: options.php:286
142
  msgid "All cached pages"
143
  msgstr ""
144
 
145
- #: options.php:287
146
- msgid "Modified pages and home page"
147
  msgstr ""
148
 
149
- #: options.php:288
150
  msgid "Only modified pages"
151
  msgstr ""
152
 
153
- #: options.php:289
154
  msgid "Nothing"
155
  msgstr ""
156
 
157
- #: options.php:292
 
 
 
 
158
  msgid ""
159
  "\"Invalidation\" is the process of deleting cached pages when they are no "
160
  "more valid."
161
  msgstr ""
162
 
163
- #: options.php:293
164
  msgid ""
165
  "Invalidation process is started when blog contents are modified (new post, "
166
  "post update, new comment,...) so\r\n"
@@ -168,253 +132,252 @@ msgid ""
168
  "content."
169
  msgstr ""
170
 
171
- #: options.php:299
 
 
 
 
 
 
 
172
  msgid "Disable cache for commenters"
173
  msgstr ""
174
 
175
- #: options.php:303
176
  msgid ""
177
  "When users leave comments, WordPress show pages with their comments even if "
178
  "in moderation\r\n"
179
  " (and not visible to others) and pre-fills the comment form."
180
  msgstr ""
181
 
182
- #: options.php:305
183
  msgid "If you want to keep those features, enable this option."
184
  msgstr ""
185
 
186
- #: options.php:306
187
  msgid "The caching system will be less efficient but the blog more usable."
188
  msgstr ""
189
 
190
- #: options.php:312
191
  msgid "Feeds caching"
192
  msgstr ""
193
 
194
- #: options.php:316
195
  msgid "When enabled the blog feeds will be cache as well."
196
  msgstr ""
197
 
198
- #: options.php:317
199
  msgid ""
200
  "Usually this options has to be left unchecked but if your blog is rather "
201
  "static,\r\n"
202
  " you can enable it and have a bit more efficiency"
203
  msgstr ""
204
 
205
- #: options.php:326
 
 
 
 
206
  msgid "Configuration for mobile devices"
207
  msgstr ""
208
 
209
- #: options.php:329
210
  msgid "Detect mobile devices"
211
  msgstr ""
212
 
213
- #: options.php:333
214
  msgid ""
215
  "When enabled mobile devices will be detected and the cached page stored "
216
  "under different name."
217
  msgstr ""
218
 
219
- #: options.php:334
220
  msgid ""
221
  "This makes blogs with different themes for mobile devices to work correctly."
222
  msgstr ""
223
 
224
- #: options.php:339
225
  msgid "Mobile agent list"
226
  msgstr ""
227
 
228
- #: options.php:343
229
  msgid "One per line mobile agents to check for when a page is requested."
230
  msgstr ""
231
 
232
- #: options.php:344
233
  msgid ""
234
  "The mobile agent string is matched against the agent a device is sending to "
235
  "the server."
236
  msgstr ""
237
 
238
- #: options.php:353
239
  msgid "Compression"
240
  msgstr ""
241
 
242
- #: options.php:357
243
  msgid ""
244
- "Your hosting space has not the \"gzencode\" function, so no compression "
245
- "options are available."
246
  msgstr ""
247
 
248
- #: options.php:363
249
  msgid "Enable compression"
250
  msgstr ""
251
 
252
- #: options.php:367
253
  msgid "When possible the page will be sent compressed to save bandwidth."
254
  msgstr ""
255
 
256
- #: options.php:368
257
  msgid ""
258
  "Only the textual part of a page can be compressed, not images, so a photo\r\n"
259
  " blog will consume a lot of bandwidth even with compression enabled."
260
  msgstr ""
261
 
262
- #: options.php:370 options.php:383
263
  msgid "Leave the options disabled if you note malfunctions, like blank pages."
264
  msgstr ""
265
 
266
- #: options.php:372
267
  msgid "If you enable this option, the option below will be enabled as well."
268
  msgstr ""
269
 
270
- #: options.php:377
271
  msgid "Disk space usage"
272
  msgstr ""
273
 
274
- #: options.php:381
275
  msgid "Enable this option to minimize disk space usage."
276
  msgstr ""
277
 
278
- #: options.php:382
279
  msgid "The cache will be a little less performant."
280
  msgstr ""
281
 
282
- #: options.php:394
283
- msgid "Cached page count"
284
- msgstr ""
285
-
286
- #: options.php:400
287
  msgid "Advanced options"
288
  msgstr ""
289
 
290
- #: options.php:404
291
  msgid "Translation"
292
  msgstr ""
293
 
294
- #: options.php:408
295
  msgid "DO NOT show this panel translated."
296
  msgstr ""
297
 
298
- #: options.php:412
299
- msgid "HTML optimization"
300
- msgstr ""
301
-
302
- #: options.php:416
303
- msgid "Try to optimize the generated HTML."
304
  msgstr ""
305
 
306
- #: options.php:417
307
  msgid ""
308
- "Be sure to extensively verify it it works with your theme on different "
309
- "browsers!"
310
- msgstr ""
311
-
312
- #: options.php:418
313
- msgid "NO MORE EFFECTIVE DUE TO COMPATIBILITY PROBLEMS"
314
  msgstr ""
315
 
316
- #: options.php:423
317
  msgid "Home caching"
318
  msgstr ""
319
 
320
- #: options.php:427
321
  msgid "DO NOT cache the home page so it is always fresh."
322
  msgstr ""
323
 
324
- #: options.php:432
325
  msgid "Redirect caching"
326
  msgstr ""
327
 
328
- #: options.php:436
329
  msgid "Cache WordPress redirects."
330
  msgstr ""
331
 
332
- #: options.php:437
333
  msgid ""
334
  "WordPress sometime sends back redirects that can be cached to avoid further "
335
  "processing time."
336
  msgstr ""
337
 
338
- #: options.php:442
 
 
 
 
339
  msgid "URL with parameters"
340
  msgstr ""
341
 
342
- #: options.php:446
343
  msgid "Cache requests with query string (parameters)."
344
  msgstr ""
345
 
346
- #: options.php:447
347
  msgid ""
348
  "This option has to be enabled for blogs which have post URLs with a question "
349
  "mark on them."
350
  msgstr ""
351
 
352
- #: options.php:448
353
  msgid ""
354
  "This option is disabled by default because there is plugins which use\r\n"
355
  " URL parameter to perform specific action that cannot be cached"
356
  msgstr ""
357
 
358
- #: options.php:450
359
  msgid ""
360
  "For who is using search engines friendly permalink format is safe to\r\n"
361
  " leave this option disabled, no performances will be lost."
362
  msgstr ""
363
 
364
- #: options.php:456
365
  msgid "URI to reject"
366
  msgstr ""
367
 
368
- #: options.php:460
369
  msgid "Write one URI per line, each URI has to start with a slash."
370
  msgstr ""
371
 
372
- #: options.php:461
373
  msgid ""
374
  "A specified URI will match the requested URI if the latter starts with the "
375
  "former."
376
  msgstr ""
377
 
378
- #: options.php:462
379
  msgid ""
380
  "If you want to specify a stric matching, surround the URI with double quotes."
381
  msgstr ""
382
 
383
- #: options.php:481
384
  msgid "Agents to reject"
385
  msgstr ""
386
 
387
- #: options.php:485
388
  msgid "Write one agent per line."
389
  msgstr ""
390
 
391
- #: options.php:486
392
  msgid ""
393
  "A specified agent will match the client agent if the latter contains the "
394
  "former. The matching is case insensitive."
395
  msgstr ""
396
 
397
- #: options.php:491
398
  msgid "Cookies matching"
399
  msgstr ""
400
 
401
- #: options.php:495
402
  msgid "Write one cookie name per line."
403
  msgstr ""
404
 
405
- #: options.php:496
406
  msgid ""
407
  "When a specified cookie will match one of the cookie names sent bby the "
408
  "client the cache stops."
409
  msgstr ""
410
 
411
- #: options.php:499
412
  msgid ""
413
  "It seems you have Facebook Connect plugin installed. Add this cookie name to "
414
  "make it works\r\n"
415
  " with Hyper Cache:"
416
  msgstr ""
417
-
418
- #: plugin.php:72
419
- msgid "Settings"
420
- msgstr ""
1
+ # Copyright (C) 2012
2
+ # This file is distributed under the same license as the package.
 
 
 
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/hyper-cache\n"
7
+ "POT-Creation-Date: 2012-01-25 22:02:42+00:00\n"
 
 
 
8
  "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: options.php:92
16
  msgid ""
17
+ "You must add to the file wp-config.php (at its beginning after the &lt;?php) "
18
+ "the line of code: <code>define('WP_CACHE', true);</code>."
 
19
  msgstr ""
20
 
21
+ #: options.php:103
22
  msgid ""
23
+ "<p><strong>Options saved BUT not active because Hyper Cache was not able to "
24
+ "update the file wp-content/advanced-cache.php (is it writable?).</strong></p>"
25
  msgstr ""
26
 
27
+ #: options.php:109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  msgid ""
29
+ "<p><strong>Hyper Cache was not able to create the folder \"wp-content/cache/"
30
+ "hyper-cache\". Make it manually setting permissions to 777.</strong></p>"
31
  msgstr ""
32
 
33
+ #: options.php:114
34
+ msgid ""
35
+ "You can find more details about configurations and working mode on <a href="
36
+ "\"%s\">Hyper Cache official page</a>."
37
  msgstr ""
38
 
39
+ #: options.php:123
40
+ msgid "Clear cache"
41
  msgstr ""
42
 
43
+ #: options.php:126
44
+ msgid "Cache status"
45
  msgstr ""
46
 
47
+ #: options.php:129
48
+ msgid "Files in cache (valid and expired)"
 
 
49
  msgstr ""
50
 
51
+ #: options.php:133
52
+ msgid "Cleaning process"
 
 
53
  msgstr ""
54
 
55
+ #: options.php:135
56
+ msgid "Next run on: "
 
 
 
57
  msgstr ""
58
 
59
+ #: options.php:142
60
  msgid ""
61
+ "The cleaning process runs hourly and it's ok to run it hourly: that grant "
62
+ "you an efficient cache. If above there is not a valid next run time, wait 10 "
63
+ "seconds and reenter this panel. If nothing change, try to deactivate and "
64
+ "reactivate Hyper Cache."
65
  msgstr ""
66
 
67
+ #: options.php:149
 
 
 
 
 
 
 
 
 
68
  msgid "Configuration"
69
  msgstr ""
70
 
71
+ #: options.php:154
72
  msgid "Cached pages timeout"
73
  msgstr ""
74
 
75
+ #: options.php:157
76
  msgid "minutes"
77
  msgstr ""
78
 
79
+ #: options.php:159
80
  msgid ""
81
  "Minutes a cached page is valid and served to users. A zero value means a "
82
  "cached page is\r\n"
83
  " valid forever."
84
  msgstr ""
85
 
86
+ #: options.php:161
87
  msgid ""
88
  "If a cached page is older than specified value (expired) it is no more used "
89
  "and\r\n"
90
  " will be regenerated on next request of it."
91
  msgstr ""
92
 
93
+ #: options.php:163
94
+ msgid "720 minutes is half a day, 1440 is a full day and so on."
 
 
 
 
 
 
 
 
 
95
  msgstr ""
96
 
97
+ #: options.php:169
98
  msgid "Cache invalidation mode"
99
  msgstr ""
100
 
101
+ #: options.php:172
102
  msgid "All cached pages"
103
  msgstr ""
104
 
105
+ #: options.php:173
106
+ msgid "Only modified posts"
107
  msgstr ""
108
 
109
+ #: options.php:174
110
  msgid "Only modified pages"
111
  msgstr ""
112
 
113
+ #: options.php:175
114
  msgid "Nothing"
115
  msgstr ""
116
 
117
+ #: options.php:179
118
+ msgid "Invalidate home, archives, categories on single post invalidation"
119
+ msgstr ""
120
+
121
+ #: options.php:182
122
  msgid ""
123
  "\"Invalidation\" is the process of deleting cached pages when they are no "
124
  "more valid."
125
  msgstr ""
126
 
127
+ #: options.php:183
128
  msgid ""
129
  "Invalidation process is started when blog contents are modified (new post, "
130
  "post update, new comment,...) so\r\n"
132
  "content."
133
  msgstr ""
134
 
135
+ #: options.php:185
136
+ msgid ""
137
+ "A new comment submission or a comment moderation is considered like a post "
138
+ "modification\r\n"
139
+ " where the post is the one the comment is relative to."
140
+ msgstr ""
141
+
142
+ #: options.php:192
143
  msgid "Disable cache for commenters"
144
  msgstr ""
145
 
146
+ #: options.php:196
147
  msgid ""
148
  "When users leave comments, WordPress show pages with their comments even if "
149
  "in moderation\r\n"
150
  " (and not visible to others) and pre-fills the comment form."
151
  msgstr ""
152
 
153
+ #: options.php:198
154
  msgid "If you want to keep those features, enable this option."
155
  msgstr ""
156
 
157
+ #: options.php:199
158
  msgid "The caching system will be less efficient but the blog more usable."
159
  msgstr ""
160
 
161
+ #: options.php:206
162
  msgid "Feeds caching"
163
  msgstr ""
164
 
165
+ #: options.php:210
166
  msgid "When enabled the blog feeds will be cache as well."
167
  msgstr ""
168
 
169
+ #: options.php:211
170
  msgid ""
171
  "Usually this options has to be left unchecked but if your blog is rather "
172
  "static,\r\n"
173
  " you can enable it and have a bit more efficiency"
174
  msgstr ""
175
 
176
+ #: options.php:218 options.php:256 options.php:297 options.php:449
177
+ msgid "Update"
178
+ msgstr ""
179
+
180
+ #: options.php:221
181
  msgid "Configuration for mobile devices"
182
  msgstr ""
183
 
184
+ #: options.php:234
185
  msgid "Detect mobile devices"
186
  msgstr ""
187
 
188
+ #: options.php:238
189
  msgid ""
190
  "When enabled mobile devices will be detected and the cached page stored "
191
  "under different name."
192
  msgstr ""
193
 
194
+ #: options.php:239
195
  msgid ""
196
  "This makes blogs with different themes for mobile devices to work correctly."
197
  msgstr ""
198
 
199
+ #: options.php:245
200
  msgid "Mobile agent list"
201
  msgstr ""
202
 
203
+ #: options.php:249
204
  msgid "One per line mobile agents to check for when a page is requested."
205
  msgstr ""
206
 
207
+ #: options.php:250
208
  msgid ""
209
  "The mobile agent string is matched against the agent a device is sending to "
210
  "the server."
211
  msgstr ""
212
 
213
+ #: options.php:260
214
  msgid "Compression"
215
  msgstr ""
216
 
217
+ #: options.php:264
218
  msgid ""
219
+ "Your hosting space has not the \"gzencode\" or \"gzinflate\" function, so no "
220
+ "compression options are available."
221
  msgstr ""
222
 
223
+ #: options.php:270
224
  msgid "Enable compression"
225
  msgstr ""
226
 
227
+ #: options.php:274
228
  msgid "When possible the page will be sent compressed to save bandwidth."
229
  msgstr ""
230
 
231
+ #: options.php:275
232
  msgid ""
233
  "Only the textual part of a page can be compressed, not images, so a photo\r\n"
234
  " blog will consume a lot of bandwidth even with compression enabled."
235
  msgstr ""
236
 
237
+ #: options.php:277 options.php:291
238
  msgid "Leave the options disabled if you note malfunctions, like blank pages."
239
  msgstr ""
240
 
241
+ #: options.php:279
242
  msgid "If you enable this option, the option below will be enabled as well."
243
  msgstr ""
244
 
245
+ #: options.php:285
246
  msgid "Disk space usage"
247
  msgstr ""
248
 
249
+ #: options.php:289
250
  msgid "Enable this option to minimize disk space usage."
251
  msgstr ""
252
 
253
+ #: options.php:290
254
  msgid "The cache will be a little less performant."
255
  msgstr ""
256
 
257
+ #: options.php:302
 
 
 
 
258
  msgid "Advanced options"
259
  msgstr ""
260
 
261
+ #: options.php:306
262
  msgid "Translation"
263
  msgstr ""
264
 
265
+ #: options.php:310
266
  msgid "DO NOT show this panel translated."
267
  msgstr ""
268
 
269
+ #: options.php:316
270
+ msgid "Disable Last-Modified header"
 
 
 
 
271
  msgstr ""
272
 
273
+ #: options.php:320
274
  msgid ""
275
+ "Disable some HTTP headers (Last-Modified) which improve performances but "
276
+ "some one is reporting they create problems which some hosting configurations."
 
 
 
 
277
  msgstr ""
278
 
279
+ #: options.php:326
280
  msgid "Home caching"
281
  msgstr ""
282
 
283
+ #: options.php:330
284
  msgid "DO NOT cache the home page so it is always fresh."
285
  msgstr ""
286
 
287
+ #: options.php:336
288
  msgid "Redirect caching"
289
  msgstr ""
290
 
291
+ #: options.php:340
292
  msgid "Cache WordPress redirects."
293
  msgstr ""
294
 
295
+ #: options.php:341
296
  msgid ""
297
  "WordPress sometime sends back redirects that can be cached to avoid further "
298
  "processing time."
299
  msgstr ""
300
 
301
+ #: options.php:346
302
+ msgid "Page not found caching (HTTP 404)"
303
+ msgstr ""
304
+
305
+ #: options.php:369
306
  msgid "URL with parameters"
307
  msgstr ""
308
 
309
+ #: options.php:373
310
  msgid "Cache requests with query string (parameters)."
311
  msgstr ""
312
 
313
+ #: options.php:374
314
  msgid ""
315
  "This option has to be enabled for blogs which have post URLs with a question "
316
  "mark on them."
317
  msgstr ""
318
 
319
+ #: options.php:375
320
  msgid ""
321
  "This option is disabled by default because there is plugins which use\r\n"
322
  " URL parameter to perform specific action that cannot be cached"
323
  msgstr ""
324
 
325
+ #: options.php:377
326
  msgid ""
327
  "For who is using search engines friendly permalink format is safe to\r\n"
328
  " leave this option disabled, no performances will be lost."
329
  msgstr ""
330
 
331
+ #: options.php:392
332
  msgid "URI to reject"
333
  msgstr ""
334
 
335
+ #: options.php:396
336
  msgid "Write one URI per line, each URI has to start with a slash."
337
  msgstr ""
338
 
339
+ #: options.php:397
340
  msgid ""
341
  "A specified URI will match the requested URI if the latter starts with the "
342
  "former."
343
  msgstr ""
344
 
345
+ #: options.php:398
346
  msgid ""
347
  "If you want to specify a stric matching, surround the URI with double quotes."
348
  msgstr ""
349
 
350
+ #: options.php:418
351
  msgid "Agents to reject"
352
  msgstr ""
353
 
354
+ #: options.php:422
355
  msgid "Write one agent per line."
356
  msgstr ""
357
 
358
+ #: options.php:423
359
  msgid ""
360
  "A specified agent will match the client agent if the latter contains the "
361
  "former. The matching is case insensitive."
362
  msgstr ""
363
 
364
+ #: options.php:429
365
  msgid "Cookies matching"
366
  msgstr ""
367
 
368
+ #: options.php:433
369
  msgid "Write one cookie name per line."
370
  msgstr ""
371
 
372
+ #: options.php:434
373
  msgid ""
374
  "When a specified cookie will match one of the cookie names sent bby the "
375
  "client the cache stops."
376
  msgstr ""
377
 
378
+ #: options.php:437
379
  msgid ""
380
  "It seems you have Facebook Connect plugin installed. Add this cookie name to "
381
  "make it works\r\n"
382
  " with Hyper Cache:"
383
  msgstr ""
 
 
 
 
languages/by_BY.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "Сістэма кэшавання wordPress не ўключаная. Калі ласка, актывуйце яе даданнем паказанага ніжэй радка ў wp-config.php. Дзякуй!";
4
- $hyper_labels['configuration'] = "Канфігурацыя";
5
- $hyper_labels['activate'] = "Актываваць кэш?";
6
- $hyper_labels['timeout'] = "Час жыцця кэшаваных старонак";
7
- $hyper_labels['timeout_desc'] = "хвілін (усталюеце ў 0, каб яны заставаліся)";
8
- $hyper_labels['count'] = "Усяго кэшаваных старонак (кэшаваныя рэдырэкты лічацца таксама)";
9
- $hyper_labels['save'] = "Захаваць";
10
- //$hyper_labels['store'] = "Store pages as";
11
- //$hyper_labels['folder'] = "Cache folder";
12
- $hyper_labels['gzip'] = "Gzip сціск";
13
- $hyper_labels['gzip_desc'] = "Адпраўляць сціснутыя ў gzip старонкі для падтрымоўваемых браўзэраў";
14
- $hyper_labels['clear'] = "Ачысціць кэш";
15
- $hyper_labels['compress_html'] = "Аптымізаваць HTML";
16
- $hyper_labels['compress_html_desc'] = "Паспрабаваць аптымізаваць HTML, выдаляючы нявыкарыстаныя прабелы. Не рабіце гэтага, калі вы выкарыстоўваеце тэгі &lt;pre&gt; у вашых запісах";
17
- $hyper_labels['redirects'] = "Кэшаваць WP рэдырэкты";
18
- $hyper_labels['redirects_desc'] = "Могуць быць праблемы з некаторымі канфігурацыямі. Паспрабуйце.";
19
- $hyper_labels['mobile'] = "Дэтэктаваць і кэшаваць старонкі для мабільных прылад";
20
- $hyper_labels['clean_interval'] = "Аўтаачыстка кожныя";
21
- $hyper_labels['clean_interval_desc'] = "хвілін (усталюеце ў 0 каб адключыць)";
22
- $hyper_labels['not_activated'] = "Hyper Cache не ўсталяваны карэктна: некаторыя файлы або дырэкторыі не створаныя. Праверце, што на дырэкторыю wp-content усталяваныя правільныя правы (777) і выдаліце файл advanced-cache.php у ёй. Дэактывуйце і пераактывуйце плагін паўторна.";
23
- $hyper_labels['expire_type'] = "Як чысціць кэш";
24
- $hyper_labels['expire_type_desc'] = "(на новых запісах, абноўленых запісах, каментарах)";
25
- $hyper_labels['advanced_options'] = "Пашыраныя налады";
26
- $hyper_labels['reject'] = "выключыць URI";
27
- $hyper_labels['reject_desc'] = "Адзін на радок. Калі URI (eg. /video/my-new-performance) пачынаецца з адной з гэтых радкоў, то ён не будзе кэшаваны.";
28
-
29
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/de_DE.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "Das WordPress Cachesystem ist nicht aktiv. Um es zu aktivieren bitte die folgende Zeile Code der Datei wp-config.php hinzuf&uuml;gen. Danke!";
4
- $hyper_labels['configuration'] = "Konfiguration";
5
- $hyper_labels['activate'] = "Cache aktiv?";
6
- $hyper_labels['expire'] = "Ablauf des Cache nach";
7
- $hyper_labels['minutes'] = "Minuten";
8
- $hyper_labels['invalidate_single_posts'] = "Invalidate single posts";
9
- $hyper_labels['invalidate_single_posts_desc'] = "Invalidate only the single cached post when modified (new comment, edited, ...)";
10
- $hyper_labels['count'] = "Gecachte Seiten";
11
- $hyper_labels['save'] = "Speichern";
12
- $hyper_labels['gzip_compression'] = "Gzip compression";
13
- $hyper_labels['gzip_compression_desc'] = "Enable gzip compression to serve copressed pages for gzip enabled browsers";
14
- $hyper_labels['clear'] = "Cache l&ouml;schen";
15
- $hyper_labels['compress_html'] = "Optimize HTML";
16
-
17
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/en_US.php DELETED
@@ -1,71 +0,0 @@
1
- <?php
2
-
3
- //$hyper_labels['wp_cache_not_enabled'] = "The wordPress cache system is not enabled. Please, activate it adding the line of code below in the file wp-config.php. Thank you!";
4
- //$hyper_labels['configuration'] = "Configuration";
5
- //$hyper_labels['activate'] = "Activate the cache?";
6
- $hyper_labels['timeout'] = "Expire a cached page after";
7
- $hyper_labels['timeout_desc'] = "minutes (set to zero to never expire)";
8
- $hyper_labels['count'] = "Total cached pages (cached redirect is counted too)";
9
- $hyper_labels['save'] = "Save";
10
- //$hyper_labels['store'] = "Store pages as";
11
- //$hyper_labels['folder'] = "Cache folder";
12
- $hyper_labels['gzip'] = "Gzip compression";
13
- $hyper_labels['gzip_desc'] = "Send gzip compressed pages to enabled browsers";
14
- $hyper_labels['clear'] = "Clear the cache";
15
- $hyper_labels['compress_html'] = "Optimize HTML";
16
- $hyper_labels['compress_html_desc'] = "Try to optimize the HTML removing unuseful spaces. Do not use if you are using &lt;pre&gt; tags in the posts";
17
- $hyper_labels['redirects'] = "Cache the WP redirects";
18
- $hyper_labels['redirects_desc'] = "Can give problems with some configuration. Try and hope.";
19
- $hyper_labels['mobile'] = "Detetect and cache for mobile devices";
20
- $hyper_labels['clean_interval'] = "Autoclean every";
21
- $hyper_labels['clean_interval_desc'] = "minutes (set to zero to disable)";
22
- //$hyper_labels['not_activated'] = "Hyper Cache is NOT correctly installed: some files or directories have not been created. Check if the wp-content directory is writable and remove any advanced-cache.php file into it. Deactivate and reactivate the plugin.";
23
- $hyper_labels['expire_type'] = "What cached pages to delete on events";
24
- $hyper_labels['expire_type_desc'] = "<b>none</b>: the cache never delete the cached page on events (comments, new posts, and so on)<br />";
25
- $hyper_labels['expire_type_desc'] .= "<b>single pages</b>: the cached pages relative to the post modified (by the editor or when a comment is added) plus the home page. New published posts invalidate all the cache.<br />";
26
- $hyper_labels['expire_type_desc'] .= "<b>single pages strictly</b>: as 'single pages' but without to invalidate all the cache on new posts publishing.<br />";
27
- $hyper_labels['expire_type_desc'] .= "<b>all</b>: all the cached pages (the blog is always up to date)<br />";
28
- $hyper_labels['expire_type_desc'] .= "Beware: when you use 'single pages strictly', a new post will appear on home page, but not on category and tag pages. If you use the 'last posts' widget/feature on sidebar it won't show updated.";
29
- $hyper_labels['advanced_options'] = "Advanced options";
30
-
31
- $hyper_labels['reject'] = "URI to reject";
32
- $hyper_labels['reject_desc'] = "One per line. When a URI (eg. /video/my-new-performance) starts with one of the listed lines, it won't be cached.";
33
-
34
- $hyper_labels['home'] = "Do not cache the home";
35
- $hyper_labels['home_desc'] = "Enabling this option, the home page and the subsequent pages for older posts will not be cached.";
36
-
37
- $hyper_labels['feed'] = "Cache the feed?";
38
- $hyper_labels['feed_desc'] = "Usually not, so we are sure to feed always an updated feed even if we do a strong cache of the web pages";
39
-
40
- // New from version 2.2.4
41
- $hyper_labels['urls_analysis'] = "URLs with query string";
42
- $hyper_labels['urls_analysis_desc'] = "URLs with parameters are URLs like www.satollo.com?param=value.";
43
- $hyper_labels['urls_analysis_desc'] .= "Hyper Cache creates cache page names using the full URL, with its parameters.";
44
- $hyper_labels['urls_analysis_desc'] .= "When using permalinks, URLs parameters are ignored by WordPress so calling tha same post URL with fake parameters creates many identical cache entries, with disk space waste.";
45
- $hyper_labels['urls_analysis_desc'] .= "There is an exception: the 's' parameter is used by WordPress to actite the internal search engine.";
46
- $hyper_labels['urls_analysis_desc'] .= "So if you disable the URLs with parameter caching, the search results won't be cached.";
47
- $hyper_labels['urls_analysis_desc'] .= "Other plugins can use parameters, caching of those URLs can rise up problem or be a performance improvement.";
48
- $hyper_labels['urls_analysis_desc'] .= "I cannot give you a final solution... BUT if you have the permalink disabled the cache will work only with this option enabled.";
49
-
50
- $hyper_labels['urls_analysis_default'] = "Do NOT cache URLs with parameters";
51
- $hyper_labels['urls_analysis_full'] = "Cache all URLs";
52
- // To be implemented
53
- //$hyper_labels['urls_analysis_removeqs'] = "Remove query string and redirect";
54
-
55
- $hyper_labels['storage'] = "Storage";
56
- $hyper_labels['storage_nogzencode_desc'] = "You have not the zlib extension installed, leave the default option!";
57
-
58
- $hyper_labels['gzip_nogzencode_desc'] = "There is not 'gzencode' function, may be you PHP has not the zlib extension active.";
59
-
60
- // New from version 2.2.5
61
- $hyper_labels['reject_agents'] = "User agents to reject";
62
- $hyper_labels['reject_agents_desc'] = "A 'one per line' list of user agents that, when matched, makes to skip the caching process.";
63
- $hyper_labels['mobile_agents'] = "Mobile user agents";
64
- $hyper_labels['mobile_agents_desc'] = "A 'one per line' list of user agents to identify mobile devices.";
65
- $hyper_labels['_notranslation'] = "Do not use translations for this configuration panel";
66
-
67
-
68
- $hyper_labels['cron_key'] = "Cron action key";
69
- $hyper_labels['cron_key_desc'] = "A complicate to guess key to start actions from cron calls (no single or double quotes, no spaces)";
70
-
71
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/fr_FR.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "Le cache de WordPress n'est pas activ&eacute;. Merci d'ajouter la ligne suivante dans votre fichier wp-config.php. Merci !";
4
- $hyper_labels['configuration'] = "Configuration";
5
- $hyper_labels['activate'] = "Activer le cache?";
6
- $hyper_labels['expire'] = "Les pages contenues dans le cache expirent apr&egrave;s";
7
- $hyper_labels['minutes'] = "minutes";
8
- $hyper_labels['invalidate_single_posts'] = "Invalidate single posts";
9
- $hyper_labels['invalidate_single_posts_desc'] = "Invalidate only the single cached post when modified (new comment, edited, ...)";
10
- $hyper_labels['count'] = "Total cached pages (cached redirect is counted too)";
11
- $hyper_labels['save'] = "Enregistrer";
12
- $hyper_labels['gzip_compression'] = "Gzip compression";
13
- $hyper_labels['gzip_compression_desc'] = "Enable gzip compression to serve copressed pages for gzip enabled browsers";
14
- $hyper_labels['clear'] = "Effacer le cache";
15
-
16
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/it_IT.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "Il sistema di caching di WordPress non &egrave; attivo. Attivarlo inserendo la riga sotto nel file wp-config.php. Grazie!";
4
- $hyper_labels['configuration'] = "Configurazione";
5
- $hyper_labels['activate'] = "Attivare la cache?";
6
- $hyper_labels['timeout'] = "Durata di una pagina";
7
- $hyper_labels['timeout_desc'] = "minuti (imposta a zero per non avere scadenza)";
8
- $hyper_labels['count'] = "Numero di pagine in cache";
9
- $hyper_labels['save'] = "Salva";
10
- //$hyper_labels['store'] = "Store pages as";
11
- //$hyper_labels['folder'] = "Cache folder";
12
- $hyper_labels['gzip'] = "Compressione gzip";
13
- $hyper_labels['gzip_desc'] = "Manda pagine compresse ai browser che le accettano";
14
- $hyper_labels['clear'] = "Svuota la cache";
15
- $hyper_labels['compress_html'] = "Ottimizza l'HTML";
16
- $hyper_labels['compress_html_desc'] = "Cerca di ottimizzare l'HTML (non usare se utilizzate il tag &lt;pre&gt;)";
17
- $hyper_labels['redirects'] = "Ottimizza i redirect";
18
- $hyper_labels['redirects_desc'] = "Potrebbe creare problemi con alcune configurazioni.";
19
- $hyper_labels['mobile'] = "Riconosci i dispositivi mobili";
20
- $hyper_labels['clean_interval'] = "Ottimizza la cache ogni";
21
- $hyper_labels['clean_interval_desc'] = "minuti (imposta a zero per disabilitare)";
22
- $hyper_labels['not_activated'] = "Hyper Cache non è installato correttamente: qualche file o qualche cartelle non è stata creata. Controlla se la wp-content è scrivibile e rimuovi il file advanced-cache.php se presente in essa. Disattiva e riattiva il plugin.";
23
- $hyper_labels['expire_type'] = "Come invalidare la cache";
24
- //$hyper_labels['expire_type_desc'] = "(nuovi articoli, articoli modificati, commenti, ...)";
25
- $hyper_labels['advanced_options'] = "Opzioni avanzate";
26
- $hyper_labels['reject'] = "URI da rifiutare";
27
- $hyper_labels['reject_desc'] = "Uno per linea. Quando un URI (ad esempio /video/my-new-performance) inizia con uno di quelli scritti non verrà messo in cache.";
28
-
29
- ?>
30
-
31
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/ru_RU.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "Система кэширования wordPress не включена. Пожалуйста, активируйте ее добавлением указанной ниже строки в wp-config.php. Спасибо!";
4
- $hyper_labels['configuration'] = "Конфигурация";
5
- $hyper_labels['activate'] = "Активировать кэш?";
6
- $hyper_labels['timeout'] = "Время жизни кэшированных страниц";
7
- $hyper_labels['timeout_desc'] = "минут (установите в 0, чтобы они оставались постоянно)";
8
- $hyper_labels['count'] = "Всего кэшированных страниц (кэшированные редиректы также считаются)";
9
- $hyper_labels['save'] = "Сохранить";
10
- //$hyper_labels['store'] = "Store pages as";
11
- //$hyper_labels['folder'] = "Cache folder";
12
- $hyper_labels['gzip'] = "Gzip сжатие";
13
- $hyper_labels['gzip_desc'] = "Отправлять сжатые в gzip страницы для поддерживаемых браузеров";
14
- $hyper_labels['clear'] = "Очистить кэш";
15
- $hyper_labels['compress_html'] = "Оптимизировать HTML";
16
- $hyper_labels['compress_html_desc'] = "Попытаться оптимизировать HTML удаляя неиспользуемые пробелы. Не делайте этого, если вы используете теги &lt;pre&gt; в ваших записях";
17
- $hyper_labels['redirects'] = "Кэшировать WP редиректы";
18
- $hyper_labels['redirects_desc'] = "Могут быть проблемы с некоторыми конфигурациями. Попробуйте.";
19
- $hyper_labels['mobile'] = "Детектировать и кэшировать страницы для мобильных устройств";
20
- $hyper_labels['clean_interval'] = "Автоочистка каждые";
21
- $hyper_labels['clean_interval_desc'] = "минут (установите в 0 чтобы отключить)";
22
- $hyper_labels['not_activated'] = "Hyper Cache не установлен корректно: некоторые файлы или директории не созданы. Проверьте что на директорию wp-content установлены правильные права (777) и удалите файл advanced-cache.php в ней. Деактивируйте и переактивируйте плагин повторно.";
23
- $hyper_labels['expire_type'] = "Как очищать кэш";
24
- $hyper_labels['expire_type_desc'] = "(на новых записях, обновленных записях, комментариях)";
25
- $hyper_labels['advanced_options'] = "Расширенные настройки";
26
- $hyper_labels['reject'] = "исключить URI";
27
- $hyper_labels['reject_desc'] = "Один на строку. Когда URI (eg. /video/my-new-performance) начинается с одной из этих строк, то он не будет кэширован.";
28
-
29
-
30
-
31
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/zh_CN.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
-
3
- $hyper_labels['wp_cache_not_enabled'] = "WordPress缓存系统尚未启动。请在wp-config.php中添加以下一行代码来激活它。谢谢";
4
- $hyper_labels['configuration'] = "恭喜";
5
- $hyper_labels['activate'] = "是否启用缓存?勾选之";
6
- $hyper_labels['timeout'] = "缓存文件在多少分钟后过期";
7
- $hyper_labels['timeout_desc'] = "分钟 (设置为0的话则代表永不过期)";
8
- $hyper_labels['count'] = "总共缓存页数 (重定向缓存也算在内)";
9
- $hyper_labels['save'] = "保存";
10
- //$hyper_labels['store'] = "Store pages as";
11
- //$hyper_labels['folder'] = "Cache folder";
12
- $hyper_labels['gzip'] = "Gzip 压缩";
13
- $hyper_labels['gzip_desc'] = "发送gzip压缩去激活浏览器";
14
- $hyper_labels['clear'] = "清除缓存";
15
- $hyper_labels['compress_html'] = "优化HTML";
16
- $hyper_labels['compress_html_desc'] = "通过取出无用的空格去最优化HTML。如果文章内含有&lt;pre&gt;标签就不要使用该选项";
17
- $hyper_labels['redirects'] = "缓存WordPress的重定向页面";
18
- $hyper_labels['redirects_desc'] = "可能导致一些配置问题,试试看,希望没有问题";
19
- $hyper_labels['mobile'] = "检测和为手机设备缓存";
20
- $hyper_labels['clean_interval'] = "每多少分钟后自动清除";
21
- $hyper_labels['clean_interval_desc'] = "分钟 (设置为0的话则代表永不清除)";
22
- $hyper_labels['not_activated'] = "Hyper Cache(极限缓存) 没有被正确安装:一些文件和目录没有成功创建。检查看wp-content目录是可写且可删除其内的advanced-cache.php。停用并重启用该插件。";
23
- $hyper_labels['expire_type'] = "什么事件下缓存页面会被删除";
24
- $hyper_labels['expire_type_desc'] = "<b>None</b>: 任何事件下(评论,新文章等),缓存都不会被删除<br />";
25
- $hyper_labels['expire_type_desc'] .= "<b>Single pages</b>: 文章被修改(包括添加了评论),首页和相关缓存被删除。新发表文章时候会清空所有的缓存。<br />";
26
- $hyper_labels['expire_type_desc'] .= "<b>Single pages strictly</b>: 类似单个页面,但是添加新文章时不会清空所有的缓存<br />";
27
- $hyper_labels['expire_type_desc'] .= "<b>All</b>: 所有的缓存页面(博客总是最新的)<br />";
28
- $hyper_labels['expire_type_desc'] .= "注意:当你选中'Single pages strictly',一个新的文章会出现在首页,但不会出现在分类和标签页里面。如果你在边栏使用了‘新近文章’插件或特色,它不会显示更新的。";
29
- $hyper_labels['advanced_options'] = "高级选项";
30
- $hyper_labels['reject'] = "拒绝的地址";
31
- $hyper_labels['reject_desc'] = "一个一行。当一个地址(如/video/my-new-performance)按照以下地址开始的话,它不会被缓存。";
32
-
33
- $hyper_labels['home'] = "不缓存首页";
34
- $hyper_labels['home_desc'] = "打开这个选项,首页和其下的旧文章页面不会被缓存。";
35
-
36
- $hyper_labels['feed'] = "是否缓存feed?";
37
- $hyper_labels['feed_desc'] = "一般不,这样我们能保证feed总是最新的,甚至我们在网站上使用了强力的缓存。";
38
-
39
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
options.php CHANGED
@@ -2,136 +2,56 @@
2
 
3
  $options = get_option('hyper');
4
 
5
- if (!$options['notranslation'])
6
  {
7
  $plugin_dir = basename(dirname(__FILE__));
8
  load_plugin_textdomain('hyper-cache', 'wp-content/plugins/' . $plugin_dir, $plugin_dir);
9
  }
10
 
11
- $installed = is_dir(ABSPATH . 'wp-content/hyper-cache') && is_file(ABSPATH . 'wp-content/advanced-cache.php') &&
12
- @filesize(ABSPATH . 'wp-content/advanced-cache.php') == @filesize(ABSPATH . 'wp-content/plugins/hyper-cache/advanced-cache.php');
13
 
14
- if ($installed && isset($_POST['clean']))
15
  {
16
- hyper_cache_invalidate();
17
  }
18
 
19
-
20
- if ($installed && isset($_POST['save']))
21
  {
22
  if (!check_admin_referer()) die('No hacking please');
23
 
24
- $options = stripslashes_deep($_POST['options']);
25
 
 
 
 
 
 
 
 
26
  if (!is_numeric($options['timeout'])) $options['timeout'] = 60;
27
  $options['timeout'] = (int)$options['timeout'];
28
 
29
  if (!is_numeric($options['clean_interval'])) $options['clean_interval'] = 60;
30
  $options['clean_interval'] = (int)$options['clean_interval'];
31
 
32
- $buffer = "<?php\n";
33
- $buffer .= '$hyper_cache_charset = "' . get_option('blog_charset') . '"' . ";\n";
34
- $buffer .= '$hyper_cache_enabled = true' . ";\n";
35
- $buffer .= '$hyper_cache_stats = ' . ($options['stats']?'true':'false') . ";\n";
36
- $buffer .= '$hyper_cache_comment = ' . ($options['comment']?'true':'false') . ";\n";
37
- $buffer .= '$hyper_cache_compress = ' . ($options['compress']?'true':'false') . ";\n";
38
- $buffer .= '$hyper_cache_timeout = ' . $options['timeout'] . ";\n";
39
- $buffer .= '$hyper_cache_cron_key = \'' . $options['cron_key'] . "';\n";
40
- $buffer .= '$hyper_cache_get = ' . ($options['get']?'true':'false') . ";\n";
41
- $buffer .= '$hyper_cache_redirects = ' . ($options['redirects']?'true':'false') . ";\n";
42
- $buffer .= '$hyper_cache_mobile = ' . ($options['mobile']?'true':'false') . ";\n";
43
- $buffer .= '$hyper_cache_feed = ' . ($options['feed']?'true':'false') . ";\n";
44
- $buffer .= '$hyper_cache_cache_qs = ' . ($options['cache_qs']?'true':'false') . ";\n";
45
-
46
- $buffer .= '$hyper_cache_home = ' . ($options['home']?'true':'false') . ";\n";
47
- //$buffer .= '$hyper_cache_folder = \'' . $options['folder'] . "';\n";
48
-
49
- if ($options['gzip']) $options['store_compressed'] = 1;
50
 
51
- $buffer .= '$hyper_cache_gzip = ' . ($options['gzip']?'true':'false') . ";\n";
52
- $buffer .= '$hyper_cache_store_compressed = ' . ($options['store_compressed']?'true':'false') . ";\n";
53
-
54
- $buffer .= '$hyper_cache_urls = \'' . $options['urls'] . "';\n";
55
- $buffer .= '$hyper_cache_folder = \'' . ABSPATH . 'wp-content/hyper-cache' . "';\n";
56
- $buffer .= '$hyper_cache_clean_interval = ' . $options['clean_interval'] . ";\n";
57
-
58
- if (trim($options['reject']) != '')
59
- {
60
- $options['reject'] = str_replace(' ', "\n", $options['reject']);
61
- $options['reject'] = str_replace("\r", "\n", $options['reject']);
62
- $buffer .= '$hyper_cache_reject = array(';
63
- $reject = explode("\n", $options['reject']);
64
- $options['reject'] = '';
65
- foreach ($reject as $uri)
66
- {
67
- $uri = trim($uri);
68
- if ($uri == '') continue;
69
- $buffer .= "\"" . addslashes(trim($uri)) . "\",";
70
- $options['reject'] .= $uri . "\n";
71
- }
72
- $buffer = rtrim($buffer, ',');
73
- $buffer .= ");\n";
74
  }
75
-
76
- if (trim($options['reject_agents']) != '')
77
- {
78
- $options['reject_agents'] = str_replace(' ', "\n", $options['reject_agents']);
79
- $options['reject_agents'] = str_replace("\r", "\n", $options['reject_agents']);
80
- $buffer .= '$hyper_cache_reject_agents = array(';
81
- $reject_agents = explode("\n", $options['reject_agents']);
82
- $options['reject_agents'] = '';
83
- foreach ($reject_agents as $uri)
84
- {
85
- $uri = trim($uri);
86
- if ($uri == '') continue;
87
- $buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
88
- $options['reject_agents'] .= $uri . "\n";
89
- }
90
- $buffer = rtrim($buffer, ',');
91
- $buffer .= ");\n";
92
- }
93
-
94
- if (trim($options['reject_cookies']) != '')
95
- {
96
- $options['reject_cookies'] = str_replace(' ', "\n", $options['reject_cookies']);
97
- $options['reject_cookies'] = str_replace("\r", "\n", $options['reject_cookies']);
98
- $buffer .= '$hyper_cache_reject_cookies = array(';
99
- $reject_cookies = explode("\n", $options['reject_cookies']);
100
- $options['reject_cookies'] = '';
101
- foreach ($reject_cookies as $c)
102
- {
103
- $c = trim($c);
104
- if ($c == '') continue;
105
- $buffer .= "\"" . addslashes(strtolower(trim($c))) . "\",";
106
- $options['reject_cookies'] .= $c . "\n";
107
- }
108
- $buffer = rtrim($buffer, ',');
109
- $buffer .= ");\n";
110
  }
 
111
 
112
- if (trim($options['mobile_agents']) != '')
 
113
  {
114
- $options['mobile_agents'] = str_replace(',', "\n", $options['mobile_agents']);
115
- $options['mobile_agents'] = str_replace("\r", "\n", $options['mobile_agents']);
116
- $buffer .= '$hyper_cache_mobile_agents = array(';
117
- $mobile_agents = explode("\n", $options['mobile_agents']);
118
- $options['mobile_agents'] = '';
119
- foreach ($mobile_agents as $uri)
120
- {
121
- $uri = trim($uri);
122
- if ($uri == '') continue;
123
- $buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
124
- $options['mobile_agents'] .= $uri . "\n";
125
- }
126
- $buffer = rtrim($buffer, ',');
127
- $buffer .= ");\n";
128
  }
129
-
130
- $buffer .= '?>';
131
- $file = fopen(ABSPATH . 'wp-content/hyper-cache-config.php', 'w');
132
- fwrite($file, $buffer);
133
- fclose($file);
134
- update_option('hyper', $options);
135
  }
136
  else
137
  {
@@ -141,119 +61,128 @@ else
141
  }
142
  }
143
 
 
144
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  <div class="wrap">
 
 
 
 
146
 
147
- <h2>Hyper Cache</h2>
 
 
 
 
148
 
149
- <?php if (!$installed) { ?>
150
- <div class="alert error" style="margin-top:10px;">
151
- <?php _e('Hyper Cache is NOT correctly installed: some files or directories have not been created. Check if the wp-content directory is writable and remove any advanced-cache.php file into it. Deactivate and reactivate the plugin.'); ?>
152
- </div>
153
- <?php } ?>
154
 
155
  <?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
156
- <div class="alert error" style="margin-top:10px;">
157
- <?php _e('The WordPress cache system is not enabled! Please, activate it adding the line of code below in the file wp-config.php.'); ?>
158
- <pre>define('WP_CACHE', true);</pre>
159
- </div>
160
  <?php } ?>
161
 
162
- <div style="padding: 10px; background-color: #E0EFF6; border: 1px solid #006">
163
- <?php printf(__('<strong>And if this plugin stops to work?</strong><br />Hyper Cache required a lot of effort to be developed and
164
- I\'m pretty sure is giving you a good, even if invisible, service.
165
- Probably Hyper Cache makes you save money with your hosting provider using a
166
- basic and cheap hosting plan intead of a bigger and expensive one.
167
- <br />So, why not consider a <a href="%s"><strong>donation</strong></a>?', 'hyper-cache'),
168
- 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483'); ?>
169
- </div>
170
 
171
  <p>
172
- <?php printf(__('You can find more details about configurations and working mode
173
- on <a href="%s">Hyper Cache official page</a>.', 'hyper-cache'),
174
- 'http://www.satollo.net/plugins/hyper-cache'); ?>
175
  </p>
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  <p>
178
- <?php _e('Other interesting plugins:'); ?>
179
- <a href="http://www.satollo.net/plugins/post-layout">Post Layout</a>,
180
- <a href="http://www.satollo.net/plugins/postacards">Postcards</a>,
181
- <a href="http://www.satollo.net/plugins/comment-notifier">Comment Notifier</a>,
182
- <a href="http://www.satollo.net/plugins/comment-image">Comment Image</a>.
183
  </p>
184
 
185
- <form method="post">
 
 
186
  <?php wp_nonce_field(); ?>
187
 
 
 
 
 
188
  <h3><?php _e('Cache status', 'hyper-cache'); ?></h3>
189
  <table class="form-table">
190
  <tr valign="top">
191
- <th><?php _e('Cached page count', 'hyper-cache'); ?></th>
192
  <td><?php echo hyper_count(); ?></td>
193
  </tr>
194
- </table>
195
- <p class="submit">
196
- <input class="button" type="submit" name="clean" value="<?php _e('Clean the cache', 'hyper-cache'); ?>">
197
- </p>
198
-
199
-
200
- <h3><?php _e('Statistics', 'hyper-cache'); ?></h3>
201
-
202
- <table class="form-table">
203
  <tr valign="top">
204
- <th><?php _e('Enable statistics collection', 'hyper-cache'); ?></th>
205
  <td>
206
- <input type="checkbox" name="options[stats]" value="1" <?php echo $options['stats']?'checked':''; ?>/>
207
- <br />
208
- <?php _e('Very experimental and not really efficient,
209
- but can be useful to check how the cache works.', 'hyper-cache'); ?>
210
- <?php _e('Many .txt files willbe created inside the wp-content folder,
211
- you can safely delete them if you need.', 'hyper-cache'); ?>
 
 
 
212
  </td>
213
  </tr>
214
  </table>
215
 
216
- <?php if ($options['stats']) { ?>
217
-
218
- <?php
219
- $hit_304 = @filesize(ABSPATH . 'wp-content/hyper-cache-304.txt');
220
- $hit_404 = @filesize(ABSPATH . 'wp-content/hyper-cache-404.txt');
221
- $hit_gzip = @filesize(ABSPATH . 'wp-content/hyper-cache-gzip.txt');
222
- $hit_plain = @filesize(ABSPATH . 'wp-content/hyper-cache-plain.txt');
223
- $hit_wp = @filesize(ABSPATH . 'wp-content/hyper-cache-wp.txt');
224
- $hit_commenter = @filesize(ABSPATH . 'wp-content/hyper-cache-commenter.txt');
225
- $total = (float)($hit_304 + $hit_404 + $hit_gzip + $hit_plain + $hit_wp + 1);
226
- ?>
227
-
228
- <p>
229
- <?php _e('Below are statitics about requests Hyper Cache can handle and the ratio between the
230
- requests served by Hyper Cache and the ones served by WordPress.', 'hyper-cache'); ?>
231
-
232
- <?php _e('Requests that bypass the cache due to configurations are not counted because they are
233
- explicitely not cacheable.', 'hyper-cache'); ?>
234
- </p>
235
- <table cellspacing="5">
236
- <tr><td>Cache hits</td><td><div style="width:<?php echo (int)(($total-$hit_wp)/$total*300); ?>px; background-color: #0f0; float: left;">&nbsp;</div> <?php echo (int)(($total-$hit_wp)/$total*100); ?>%</td></tr>
237
- <tr><td>Cache misses</td><td><div style="width:<?php echo (int)(($hit_wp)/$total*300); ?>px; background-color: #f00; float: left;">&nbsp;</div> <?php echo (int)(($hit_wp)/$total*100); ?>%</td></tr>
238
- </table>
239
-
240
- <p><?php _e('Detailed data broken up on different types of cache hits'); ?></p>
241
-
242
- <table cellspacing="5">
243
- <tr><td>Total requests handled</td><td><?php echo $total; ?></td></tr>
244
- <tr><td>304 responses</td><td><div style="width:<?php echo (int)(($hit_304)/$total*300); ?>px; background-color: #339; float: left;">&nbsp;</div><?php echo (int)($hit_304/$total*100); ?>% (<?php echo $hit_304; ?>)</td></tr>
245
- <tr><td>404 responses</td><td><div style="width:<?php echo (int)(($hit_404)/$total*300); ?>px; background-color: #33b; float: left;">&nbsp;</div><?php echo (int)($hit_404/$total*100); ?>% (<?php echo $hit_404; ?>)</td></tr>
246
- <tr><td>Compressed pages served</td><td><div style="width:<?php echo (int)(($hit_gzip)/$total*300); ?>px; background-color: #33d; float: left;">&nbsp;</div><?php echo (int)($hit_gzip/$total*100); ?>% (<?php echo $hit_gzip; ?>)</td></tr>
247
- <tr><td>Plain pages served</td><td><div style="width:<?php echo (int)(($hit_plain)/$total*300); ?>px; background-color: #33f; float: left;">&nbsp;</div><?php echo (int)($hit_plain/$total*100); ?>% (<?php echo $hit_plain; ?>)</td></tr>
248
- <tr><td>Not in cache</td><td><div style="width:<?php echo (int)(($hit_wp)/$total*300); ?>px; background-color: #f00; float: left;">&nbsp;</div><?php echo (int)($hit_wp/$total*100); ?>% (<?php echo $hit_wp; ?>)</td></tr>
249
- </table>
250
-
251
- <?php } ?>
252
- <p class="submit">
253
- <input class="button" type="submit" name="save" value="<?php _e('Update'); ?>">
254
- </p>
255
 
256
- <h3><?php _e('Configuration'); ?></h3>
257
 
258
  <table class="form-table">
259
 
@@ -262,26 +191,13 @@ explicitely not cacheable.', 'hyper-cache'); ?>
262
  <td>
263
  <input type="text" size="5" name="options[timeout]" value="<?php echo htmlspecialchars($options['timeout']); ?>"/>
264
  (<?php _e('minutes', 'hyper-cache'); ?>)
265
- <br />
266
  <?php _e('Minutes a cached page is valid and served to users. A zero value means a cached page is
267
  valid forever.', 'hyper-cache'); ?>
268
  <?php _e('If a cached page is older than specified value (expired) it is no more used and
269
  will be regenerated on next request of it.', 'hyper-cache'); ?>
270
  <?php _e('720 minutes is half a day, 1440 is a full day and so on.', 'hyper-cache'); ?>
271
- </td>
272
- </tr>
273
-
274
- <tr valign="top">
275
- <th><?php _e('Cache autoclean', 'hyper-cache'); ?></th>
276
- <td>
277
- <input type="text" size="5" name="options[clean_interval]" value="<?php echo htmlspecialchars($options['clean_interval']); ?>"/>
278
- (<?php _e('minutes', 'hyper-cache'); ?>)
279
- <br />
280
- <?php _e('Frequency of the autoclean process which removes to expired cached pages to free
281
- disk space.', 'hyper-cache'); ?>
282
- <?php _e('Set lower or equals of timeout above. If set to zero the autoclean process never
283
- runs.', 'hyper-cache'); ?>
284
- <?php _e('If timeout is set to zero, autoclean never runs, so this value has no meaning', 'hyper-cache'); ?>
285
  </td>
286
  </tr>
287
 
@@ -290,26 +206,34 @@ explicitely not cacheable.', 'hyper-cache'); ?>
290
  <td>
291
  <select name="options[expire_type]">
292
  <option value="all" <?php echo ($options['expire_type'] == 'all')?'selected':''; ?>><?php _e('All cached pages', 'hyper-cache'); ?></option>
293
- <option value="post" <?php echo ($options['expire_type'] == 'post')?'selected':''; ?>><?php _e('Modified pages and home page', 'hyper-cache'); ?></option>
294
- <option value="post_strictly" <?php echo ($options['expire_type'] == 'post_strictly')?'selected':''; ?>><?php _e('Only modified pages', 'hyper-cache'); ?></option>
295
  <option value="none" <?php echo ($options['expire_type'] == 'none')?'selected':''; ?>><?php _e('Nothing', 'hyper-cache'); ?></option>
296
  </select>
297
  <br />
 
 
 
 
298
  <?php _e('"Invalidation" is the process of deleting cached pages when they are no more valid.', 'hyper-cache'); ?>
299
  <?php _e('Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so
300
  one or more cached pages need to be refreshed to get that new content.', 'hyper-cache'); ?>
 
 
 
301
  </td>
302
  </tr>
303
 
304
  <tr valign="top">
305
  <th><?php _e('Disable cache for commenters', 'hyper-cache'); ?></th>
306
  <td>
307
- <input type="checkbox" name="options[comment]" value="1" <?php echo $options['comment']?'checked':''; ?>/>
308
- <br />
309
  <?php _e('When users leave comments, WordPress show pages with their comments even if in moderation
310
  (and not visible to others) and pre-fills the comment form.', 'hyper-cache'); ?>
311
  <?php _e('If you want to keep those features, enable this option.', 'hyper-cache'); ?>
312
- <?php _e('The caching system will be less efficient but the blog more usable.'); ?>
 
313
 
314
  </td>
315
  </tr>
@@ -317,13 +241,24 @@ explicitely not cacheable.', 'hyper-cache'); ?>
317
  <tr valign="top">
318
  <th><?php _e('Feeds caching', 'hyper-cache'); ?></th>
319
  <td>
320
- <input type="checkbox" name="options[feed]" value="1" <?php echo $options['feed']?'checked':''; ?>/>
321
- <br />
322
  <?php _e('When enabled the blog feeds will be cache as well.', 'hyper-cache'); ?>
323
  <?php _e('Usually this options has to be left unchecked but if your blog is rather static,
324
  you can enable it and have a bit more efficiency', 'hyper-cache'); ?>
 
325
  </td>
326
  </tr>
 
 
 
 
 
 
 
 
 
 
327
  </table>
328
  <p class="submit">
329
  <input class="button" type="submit" name="save" value="<?php _e('Update'); ?>">
@@ -331,13 +266,24 @@ explicitely not cacheable.', 'hyper-cache'); ?>
331
 
332
  <h3><?php _e('Configuration for mobile devices', 'hyper-cache'); ?></h3>
333
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
334
  <tr valign="top">
335
  <th><?php _e('Detect mobile devices', 'hyper-cache'); ?></th>
336
  <td>
337
- <input type="checkbox" name="options[mobile]" value="1" <?php echo $options['mobile']?'checked':''; ?>/>
338
- <br />
339
  <?php _e('When enabled mobile devices will be detected and the cached page stored under different name.', 'hyper-cache'); ?>
340
  <?php _e('This makes blogs with different themes for mobile devices to work correctly.', 'hyper-cache'); ?>
 
341
  </td>
342
  </tr>
343
 
@@ -345,9 +291,10 @@ explicitely not cacheable.', 'hyper-cache'); ?>
345
  <th><?php _e('Mobile agent list', 'hyper-cache'); ?></th>
346
  <td>
347
  <textarea wrap="off" rows="4" cols="70" name="options[mobile_agents]"><?php echo htmlspecialchars($options['mobile_agents']); ?></textarea>
348
- <br />
349
  <?php _e('One per line mobile agents to check for when a page is requested.', 'hyper-cache'); ?>
350
  <?php _e('The mobile agent string is matched against the agent a device is sending to the server.', 'hyper-cache'); ?>
 
351
  </td>
352
  </tr>
353
  </table>
@@ -358,35 +305,53 @@ explicitely not cacheable.', 'hyper-cache'); ?>
358
 
359
  <h3><?php _e('Compression', 'hyper-cache'); ?></h3>
360
 
361
- <?php if (!function_exists('gzencode')) { ?>
362
 
363
- <p><?php _e('Your hosting space has not the "gzencode" function, so no compression options are available.', 'hyper-cache'); ?></p>
364
 
365
  <?php } else { ?>
366
 
367
  <table class="form-table">
368
  <tr valign="top">
369
- <th><?php _e('Enable compression', 'hyper-cache'); ?></th>
370
  <td>
371
- <input type="checkbox" name="options[gzip]" value="1" <?php echo $options['gzip']?'checked':''; ?> />
 
 
 
 
 
372
  <br />
373
- <?php _e('When possible the page will be sent compressed to save bandwidth.', 'hyper-cache'); ?>
 
 
 
 
 
 
 
 
 
 
 
374
  <?php _e('Only the textual part of a page can be compressed, not images, so a photo
375
  blog will consume a lot of bandwidth even with compression enabled.', 'hyper-cache'); ?>
376
  <?php _e('Leave the options disabled if you note malfunctions, like blank pages.', 'hyper-cache'); ?>
377
  <br />
378
- <?php _e('If you enable this option, the option below will be enabled as well.', 'hyper-cache'); ?>
 
379
  </td>
380
  </tr>
381
 
382
  <tr valign="top">
383
- <th><?php _e('Disk space usage', 'hyper-cache'); ?></th>
384
  <td>
385
- <input type="checkbox" name="options[store_compressed]" value="1" <?php echo $options['store_compressed']?'checked':''; ?> />
386
- <br />
387
- <?php _e('Enable this option to minimize disk space usage.', 'hyper-cache'); ?>
388
- <?php _e('The cache will be a little less performant.', 'hyper-cache'); ?>
389
  <?php _e('Leave the options disabled if you note malfunctions, like blank pages.', 'hyper-cache'); ?>
 
390
  </td>
391
  </tr>
392
  </table>
@@ -403,18 +368,19 @@ explicitely not cacheable.', 'hyper-cache'); ?>
403
  <th><?php _e('Translation', 'hyper-cache'); ?></th>
404
  <td>
405
  <input type="checkbox" name="options[notranslation]" value="1" <?php echo $options['notranslation']?'checked':''; ?>/>
406
- <br />
407
  <?php _e('DO NOT show this panel translated.', 'hyper-cache'); ?>
 
408
  </td>
409
  </tr>
 
410
  <tr valign="top">
411
- <th><?php _e('HTML optimization', 'hyper-cache'); ?></th>
412
  <td>
413
- <input type="checkbox" name="options[compress]" value="1" <?php echo $options['compress']?'checked':''; ?>/>
414
- <br />
415
- <?php _e('Try to optimize the generated HTML.','hyper-cache'); ?>
416
- <?php _e('Be sure to extensively verify it it works with your theme on different browsers!', 'hyper-cache'); ?>
417
- <?php _e('NO MORE EFFECTIVE DUE TO COMPATIBILITY PROBLEMS', 'hyper-cache'); ?>
418
  </td>
419
  </tr>
420
 
@@ -422,8 +388,9 @@ explicitely not cacheable.', 'hyper-cache'); ?>
422
  <th><?php _e('Home caching', 'hyper-cache'); ?></th>
423
  <td>
424
  <input type="checkbox" name="options[home]" value="1" <?php echo $options['home']?'checked':''; ?>/>
425
- <br />
426
  <?php _e('DO NOT cache the home page so it is always fresh.','hyper-cache'); ?>
 
427
  </td>
428
  </tr>
429
 
@@ -437,25 +404,68 @@ explicitely not cacheable.', 'hyper-cache'); ?>
437
  </td>
438
  </tr>
439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  <tr valign="top">
441
  <th><?php _e('URL with parameters', 'hyper-cache'); ?></th>
442
  <td>
443
  <input type="checkbox" name="options[cache_qs]" value="1" <?php echo $options['cache_qs']?'checked':''; ?>/>
444
- <br />
445
  <?php _e('Cache requests with query string (parameters).', 'hyper-cache'); ?>
446
  <?php _e('This option has to be enabled for blogs which have post URLs with a question mark on them.', 'hyper-cache'); ?>
447
  <?php _e('This option is disabled by default because there is plugins which use
448
  URL parameter to perform specific action that cannot be cached', 'hyper-cache'); ?>
449
  <?php _e('For who is using search engines friendly permalink format is safe to
450
  leave this option disabled, no performances will be lost.', 'hyper-cache'); ?>
 
451
  </td>
452
  </tr>
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  <tr valign="top">
455
  <th><?php _e('URI to reject', 'hyper-cache'); ?></th>
456
  <td>
457
  <textarea wrap="off" rows="5" cols="70" name="options[reject]"><?php echo htmlspecialchars($options['reject']); ?></textarea>
458
- <br />
459
  <?php _e('Write one URI per line, each URI has to start with a slash.', 'hyper-cache'); ?>
460
  <?php _e('A specified URI will match the requested URI if the latter starts with the former.', 'hyper-cache'); ?>
461
  <?php _e('If you want to specify a stric matching, surround the URI with double quotes.', 'hyper-cache'); ?>
@@ -473,6 +483,7 @@ explicitely not cacheable.', 'hyper-cache'); ?>
473
  foreach($languages as $l) echo $base . '/' . $l . '/ ';
474
  }
475
  ?>
 
476
  </td>
477
  </tr>
478
 
@@ -480,9 +491,10 @@ explicitely not cacheable.', 'hyper-cache'); ?>
480
  <th><?php _e('Agents to reject', 'hyper-cache'); ?></th>
481
  <td>
482
  <textarea wrap="off" rows="5" cols="70" name="options[reject_agents]"><?php echo htmlspecialchars($options['reject_agents']); ?></textarea>
483
- <br />
484
  <?php _e('Write one agent per line.', 'hyper-cache'); ?>
485
  <?php _e('A specified agent will match the client agent if the latter contains the former. The matching is case insensitive.', 'hyper-cache'); ?>
 
486
  </td>
487
  </tr>
488
 
@@ -490,7 +502,7 @@ explicitely not cacheable.', 'hyper-cache'); ?>
490
  <th><?php _e('Cookies matching', 'hyper-cache'); ?></th>
491
  <td>
492
  <textarea wrap="off" rows="5" cols="70" name="options[reject_cookies]"><?php echo htmlspecialchars($options['reject_cookies']); ?></textarea>
493
- <br />
494
  <?php _e('Write one cookie name per line.', 'hyper-cache'); ?>
495
  <?php _e('When a specified cookie will match one of the cookie names sent bby the client the cache stops.', 'hyper-cache'); ?>
496
  <?php if (defined('FBC_APP_KEY_OPTION')) { ?>
@@ -500,7 +512,7 @@ explicitely not cacheable.', 'hyper-cache'); ?>
500
  <br />
501
  <strong><?php echo get_option(FBC_APP_KEY_OPTION); ?>_user</strong>
502
  <?php } ?>
503
-
504
  </td>
505
  </tr>
506
 
2
 
3
  $options = get_option('hyper');
4
 
5
+ if (!isset($options['notranslation']))
6
  {
7
  $plugin_dir = basename(dirname(__FILE__));
8
  load_plugin_textdomain('hyper-cache', 'wp-content/plugins/' . $plugin_dir, $plugin_dir);
9
  }
10
 
 
 
11
 
12
+ if (isset($_POST['clean']))
13
  {
14
+ hyper_delete_path(WP_CONTENT_DIR . '/cache/hyper-cache');
15
  }
16
 
17
+ $error = false;
18
+ if (isset($_POST['save']))
19
  {
20
  if (!check_admin_referer()) die('No hacking please');
21
 
22
+ $tmp = stripslashes_deep($_POST['options']);
23
 
24
+ if ($options['gzip'] != $tmp['gzip'])
25
+ {
26
+ hyper_delete_path(WP_CONTENT_DIR . '/cache/hyper-cache');
27
+ }
28
+
29
+ $options = $tmp;
30
+
31
  if (!is_numeric($options['timeout'])) $options['timeout'] = 60;
32
  $options['timeout'] = (int)$options['timeout'];
33
 
34
  if (!is_numeric($options['clean_interval'])) $options['clean_interval'] = 60;
35
  $options['clean_interval'] = (int)$options['clean_interval'];
36
 
37
+ $buffer = hyper_generate_config($options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ $file = @fopen(WP_CONTENT_DIR . '/advanced-cache.php', 'w');
40
+ if ($file) {
41
+ @fwrite($file, $buffer);
42
+ @fclose($file);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
+ else {
45
+ $error = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
+ update_option('hyper', $options);
48
 
49
+ // When the cache does not expire
50
+ if ($options['expire_type'] == 'none')
51
  {
52
+ @unlink(WP_CONTENT_DIR . '/cache/hyper-cache/_global.dat');
53
+ @unlink(WP_CONTENT_DIR . '/cache/hyper-cache/_archives.dat');
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
 
 
 
 
 
 
55
  }
56
  else
57
  {
61
  }
62
  }
63
 
64
+
65
  ?>
66
+ <style>
67
+ /* Admin header */
68
+ #satollo-header {
69
+ text-align: left;
70
+ background-color: #f4f4f4;
71
+ padding: 5px;
72
+ padding-left: 15px;
73
+ border-radius: 3px;
74
+ text-transform: uppercase;
75
+ }
76
+
77
+ #satollo-header a {
78
+ margin-right: 15px;
79
+ }
80
+
81
+ .hints {
82
+ border: 1px solid #aaf;
83
+ background-color: #fafaff;
84
+ padding: 5px;
85
+ margin-top: 10px;
86
+ border-bottom-left-radius: 4px 4px;
87
+ border-bottom-right-radius: 4px 4px;
88
+ border-top-left-radius: 4px 4px;
89
+ border-top-right-radius: 4px 4px;
90
+ }
91
+ .form-table {
92
+ background-color: #fff;
93
+ border: 3px solid #ddd;
94
+ }
95
+
96
+ .form-table th {
97
+ text-align: right;
98
+ font-weight: bold;
99
+ }
100
+ </style>
101
+
102
  <div class="wrap">
103
+
104
+ <div id="satollo-header">
105
+ <a href="http://www.satollo.net/plugins/hyper-cache" target="_blank">Get Help</a>
106
+ <a href="http://www.satollo.net/forums" target="_blank">Forum</a>
107
 
108
+ <form style="display: inline; margin: 0;" action="http://www.satollo.net/wp-content/plugins/newsletter/do/subscribe.php" method="post" target="_blank">
109
+ Subscribe to satollo.net <input type="email" name="ne" required placeholder="Your email">
110
+ <input type="hidden" name="nr" value="hyper-cache">
111
+ <input type="submit" value="Go">
112
+ </form>
113
 
114
+ <a href="https://www.facebook.com/satollo.net" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/facebook.png"></a>
115
+
116
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RJB428Z5KJPR4" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/donate.png"></a>
117
+ <a href="http://www.satollo.net/donations" target="_blank">Even <b>1$</b> helps: read more</a>
118
+ </div>
119
 
120
  <?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
121
+ <div class="error">
122
+ <?php _e('You must add to the file wp-config.php (at its beginning after the &lt;?php) the line of code: <code>define(\'WP_CACHE\', true);</code>.', 'hyper-cache'); ?>
123
+ </div>
 
124
  <?php } ?>
125
 
126
+ <h2>Hyper Cache</h2>
127
+
128
+ <h3>Contributors</h3>
 
 
 
 
 
129
 
130
  <p>
131
+ <strong>Florian Höch</strong> (<a href="http://hoech.net" target="_blank">hoech.net</a>) for new features on version 2.9+.
132
+ <strong>Quentin</strong> (<a href="http://www.tradpress.fr" target="_blank">TradPress</a>) for French translation.
133
+ <strong>Mckryak</strong> for Russian translation. Tommy Tung alias Ragnarok for Chineese and Twaineese translations. And many others to be added.
134
  </p>
135
 
136
+ <?php
137
+ if ($error)
138
+ {
139
+ echo __('<p><strong>Options saved BUT not active because Hyper Cache was not able to update the file wp-content/advanced-cache.php (is it writable?).</strong></p>', 'hyper-cache');
140
+ }
141
+ ?>
142
+ <?php
143
+ if (!wp_mkdir_p(WP_CONTENT_DIR . '/cache/hyper-cache'))
144
+ {
145
+ echo __('<p><strong>Hyper Cache was not able to create the folder "wp-content/cache/hyper-cache". Make it manually setting permissions to 777.</strong></p>', 'hyper-cache');
146
+ }
147
+ ?>
148
+
149
  <p>
150
+ <?php printf(__('You can find more details about configurations and working mode on <a href="%s">Hyper Cache official page</a>.', 'hyper-cache'), 'http://www.satollo.net/plugins/hyper-cache'); ?>
 
 
 
 
151
  </p>
152
 
153
+
154
+
155
+ <form method="post" action="">
156
  <?php wp_nonce_field(); ?>
157
 
158
+ <p class="submit">
159
+ <input class="button" type="submit" name="clean" value="<?php _e('Clear cache', 'hyper-cache'); ?>">
160
+ </p>
161
+
162
  <h3><?php _e('Cache status', 'hyper-cache'); ?></h3>
163
  <table class="form-table">
164
  <tr valign="top">
165
+ <th><?php _e('Files in cache (valid and expired)', 'hyper-cache'); ?></th>
166
  <td><?php echo hyper_count(); ?></td>
167
  </tr>
 
 
 
 
 
 
 
 
 
168
  <tr valign="top">
169
+ <th><?php _e('Cleaning process', 'hyper-cache'); ?></th>
170
  <td>
171
+ <?php _e('Next run on: ', 'hyper-cache'); ?>
172
+ <?php
173
+ $next_scheduled = wp_next_scheduled('hyper_clean');
174
+ if (empty($next_scheduled)) echo '? (read below)';
175
+ else echo gmdate(get_option('date_format') . ' ' . get_option('time_format'), $next_scheduled + get_option('gmt_offset')*3600);
176
+ ?>
177
+ <div class="hints">
178
+ <?php _e('The cleaning process runs hourly and it\'s ok to run it hourly: that grant you an efficient cache. If above there is not a valid next run time, wait 10 seconds and reenter this panel. If nothing change, try to deactivate and reactivate Hyper Cache.', 'hyper-cache'); ?>
179
+ </div>
180
  </td>
181
  </tr>
182
  </table>
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
+ <h3><?php _e('Configuration', 'hyper-cache'); ?></h3>
186
 
187
  <table class="form-table">
188
 
191
  <td>
192
  <input type="text" size="5" name="options[timeout]" value="<?php echo htmlspecialchars($options['timeout']); ?>"/>
193
  (<?php _e('minutes', 'hyper-cache'); ?>)
194
+ <div class="hints">
195
  <?php _e('Minutes a cached page is valid and served to users. A zero value means a cached page is
196
  valid forever.', 'hyper-cache'); ?>
197
  <?php _e('If a cached page is older than specified value (expired) it is no more used and
198
  will be regenerated on next request of it.', 'hyper-cache'); ?>
199
  <?php _e('720 minutes is half a day, 1440 is a full day and so on.', 'hyper-cache'); ?>
200
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  </td>
202
  </tr>
203
 
206
  <td>
207
  <select name="options[expire_type]">
208
  <option value="all" <?php echo ($options['expire_type'] == 'all')?'selected':''; ?>><?php _e('All cached pages', 'hyper-cache'); ?></option>
209
+ <option value="post" <?php echo ($options['expire_type'] == 'post')?'selected':''; ?>><?php _e('Only modified posts', 'hyper-cache'); ?></option>
210
+ <!--<option value="post_strictly" <?php echo ($options['expire_type'] == 'post_strictly')?'selected':''; ?>><?php _e('Only modified pages', 'hyper-cache'); ?></option>-->
211
  <option value="none" <?php echo ($options['expire_type'] == 'none')?'selected':''; ?>><?php _e('Nothing', 'hyper-cache'); ?></option>
212
  </select>
213
  <br />
214
+ <input type="checkbox" name="options[archive]" value="1" <?php echo $options['archive']?'checked':''; ?>/>
215
+ <?php _e('Invalidate home, archives, categories on single post invalidation', 'hyper-cache'); ?>
216
+ <br />
217
+ <div class="hints">
218
  <?php _e('"Invalidation" is the process of deleting cached pages when they are no more valid.', 'hyper-cache'); ?>
219
  <?php _e('Invalidation process is started when blog contents are modified (new post, post update, new comment,...) so
220
  one or more cached pages need to be refreshed to get that new content.', 'hyper-cache'); ?>
221
+ <?php _e('A new comment submission or a comment moderation is considered like a post modification
222
+ where the post is the one the comment is relative to.', 'hyper-cache'); ?>
223
+ </div>
224
  </td>
225
  </tr>
226
 
227
  <tr valign="top">
228
  <th><?php _e('Disable cache for commenters', 'hyper-cache'); ?></th>
229
  <td>
230
+ <input type="checkbox" name="options[comment]" value="1" <?php echo isset($options['comment'])?'checked':''; ?>/>
231
+ <div class="hints">
232
  <?php _e('When users leave comments, WordPress show pages with their comments even if in moderation
233
  (and not visible to others) and pre-fills the comment form.', 'hyper-cache'); ?>
234
  <?php _e('If you want to keep those features, enable this option.', 'hyper-cache'); ?>
235
+ <?php _e('The caching system will be less efficient but the blog more usable.', 'hyper-cache'); ?>
236
+ </div>
237
 
238
  </td>
239
  </tr>
241
  <tr valign="top">
242
  <th><?php _e('Feeds caching', 'hyper-cache'); ?></th>
243
  <td>
244
+ <input type="checkbox" name="options[feed]" value="1" <?php echo isset($options['feed'])?'checked':''; ?>/>
245
+ <div class="hints">
246
  <?php _e('When enabled the blog feeds will be cache as well.', 'hyper-cache'); ?>
247
  <?php _e('Usually this options has to be left unchecked but if your blog is rather static,
248
  you can enable it and have a bit more efficiency', 'hyper-cache'); ?>
249
+ </div>
250
  </td>
251
  </tr>
252
+
253
+ <tr valign="top">
254
+ <th><?php _e('Allow browser caching', 'hyper-cache'); ?></th>
255
+ <td>
256
+ <input type="checkbox" name="options[browsercache]" value="1" <?php echo isset($options['browsercache'])?'checked':''; ?>/>
257
+ <div class="hints">
258
+ <?php _e('Allow browser caching.','hyper-cache'); ?>
259
+ </div>
260
+ </td>
261
+ </tr>
262
  </table>
263
  <p class="submit">
264
  <input class="button" type="submit" name="save" value="<?php _e('Update'); ?>">
266
 
267
  <h3><?php _e('Configuration for mobile devices', 'hyper-cache'); ?></h3>
268
  <table class="form-table">
269
+ <tr valign="top">
270
+ <th><?php _e('WordPress Mobile Pack', 'hyper-cache'); ?></th>
271
+ <td>
272
+ <input type="checkbox" name="options[plugin_mobile_pack]" value="1" <?php echo isset($options['plugin_mobile_pack'])?'checked':''; ?>/>
273
+ <div class="hints">
274
+ <?php _e('Enbale integration with <a href="http://wordpress.org/extend/plugins/wordpress-mobile-pack/">WordPress Mobile Pack</a> plugin. If you have that plugin, Hyper Cache use it to detect mobile devices and caches saparately
275
+ the different pages generated.', 'hyper-cache'); ?>
276
+ </div>
277
+ </td>
278
+ </tr>
279
  <tr valign="top">
280
  <th><?php _e('Detect mobile devices', 'hyper-cache'); ?></th>
281
  <td>
282
+ <input type="checkbox" name="options[mobile]" value="1" <?php echo isset($options['mobile'])?'checked':''; ?>/>
283
+ <div class="hints">
284
  <?php _e('When enabled mobile devices will be detected and the cached page stored under different name.', 'hyper-cache'); ?>
285
  <?php _e('This makes blogs with different themes for mobile devices to work correctly.', 'hyper-cache'); ?>
286
+ </div>
287
  </td>
288
  </tr>
289
 
291
  <th><?php _e('Mobile agent list', 'hyper-cache'); ?></th>
292
  <td>
293
  <textarea wrap="off" rows="4" cols="70" name="options[mobile_agents]"><?php echo htmlspecialchars($options['mobile_agents']); ?></textarea>
294
+ <div class="hints">
295
  <?php _e('One per line mobile agents to check for when a page is requested.', 'hyper-cache'); ?>
296
  <?php _e('The mobile agent string is matched against the agent a device is sending to the server.', 'hyper-cache'); ?>
297
+ </div>
298
  </td>
299
  </tr>
300
  </table>
305
 
306
  <h3><?php _e('Compression', 'hyper-cache'); ?></h3>
307
 
308
+ <?php if (!function_exists('gzencode') || !function_exists('gzinflate')) { ?>
309
 
310
+ <p><?php _e('Your hosting space has not the "gzencode" or "gzinflate" function, so no compression options are available.', 'hyper-cache'); ?></p>
311
 
312
  <?php } else { ?>
313
 
314
  <table class="form-table">
315
  <tr valign="top">
316
+ <th><?php _e('Store compressed pages', 'hyper-cache'); ?></th>
317
  <td>
318
+ <input type="checkbox" name="options[store_compressed]" value="1" <?php echo $options['store_compressed']?'checked':''; ?>
319
+ onchange="jQuery('input[name=&quot;options[gzip]&quot;]').attr('disabled', !this.checked)" />
320
+ <div class="hints">
321
+ <?php _e('Enable this option to minimize disk space usage and make sending of compressed pages possible with the option below.', 'hyper-cache'); ?>
322
+ <?php _e('The cache will be a little less performant.', 'hyper-cache'); ?>
323
+ <?php _e('Leave the options disabled if you note malfunctions, like blank pages.', 'hyper-cache'); ?>
324
  <br />
325
+ <?php _e('If you enable this option, the option below will be available as well.', 'hyper-cache'); ?>
326
+ </div>
327
+ </td>
328
+ </tr>
329
+
330
+ <tr valign="top">
331
+ <th><?php _e('Send compressed pages', 'hyper-cache'); ?></th>
332
+ <td>
333
+ <input type="checkbox" name="options[gzip]" value="1" <?php echo $options['gzip']?'checked':''; ?>
334
+ <?php echo $options['store_compressed']?'':'disabled'; ?> />
335
+ <div class="hints">
336
+ <?php _e('When possible (i.e. if the browser accepts compression and the page was cached compressed) the page will be sent compressed to save bandwidth.', 'hyper-cache'); ?>
337
  <?php _e('Only the textual part of a page can be compressed, not images, so a photo
338
  blog will consume a lot of bandwidth even with compression enabled.', 'hyper-cache'); ?>
339
  <?php _e('Leave the options disabled if you note malfunctions, like blank pages.', 'hyper-cache'); ?>
340
  <br />
341
+ <?php _e('If you enable this option, the option below will be available as well.', 'hyper-cache'); ?>
342
+ </div>
343
  </td>
344
  </tr>
345
 
346
  <tr valign="top">
347
+ <th><?php _e('On-the-fly compression', 'hyper-cache'); ?></th>
348
  <td>
349
+ <input type="checkbox" name="options[gzip_on_the_fly]" value="1" <?php echo $options['gzip_on_the_fly']?'checked':''; ?> />
350
+ <div class="hints">
351
+ <?php _e('When possible (i.e. if the browser accepts compression) use on-the-fly compression to save bandwidth when sending pages which are not compressed.', 'hyper-cache'); ?>
352
+ <?php _e('Serving of such pages will be a little less performant.', 'hyper-cache'); ?>
353
  <?php _e('Leave the options disabled if you note malfunctions, like blank pages.', 'hyper-cache'); ?>
354
+ </div>
355
  </td>
356
  </tr>
357
  </table>
368
  <th><?php _e('Translation', 'hyper-cache'); ?></th>
369
  <td>
370
  <input type="checkbox" name="options[notranslation]" value="1" <?php echo $options['notranslation']?'checked':''; ?>/>
371
+ <div class="hints">
372
  <?php _e('DO NOT show this panel translated.', 'hyper-cache'); ?>
373
+ </div>
374
  </td>
375
  </tr>
376
+
377
  <tr valign="top">
378
+ <th><?php _e('Disable Last-Modified header', 'hyper-cache'); ?></th>
379
  <td>
380
+ <input type="checkbox" name="options[lastmodified]" value="1" <?php echo $options['lastmodified']?'checked':''; ?>/>
381
+ <div class="hints">
382
+ <?php _e('Disable some HTTP headers (Last-Modified) which improve performances but some one is reporting they create problems which some hosting configurations.','hyper-cache'); ?>
383
+ </div>
 
384
  </td>
385
  </tr>
386
 
388
  <th><?php _e('Home caching', 'hyper-cache'); ?></th>
389
  <td>
390
  <input type="checkbox" name="options[home]" value="1" <?php echo $options['home']?'checked':''; ?>/>
391
+ <div class="hints">
392
  <?php _e('DO NOT cache the home page so it is always fresh.','hyper-cache'); ?>
393
+ </div>
394
  </td>
395
  </tr>
396
 
404
  </td>
405
  </tr>
406
 
407
+ <tr valign="top">
408
+ <th><?php _e('Page not found caching (HTTP 404)', 'hyper-cache'); ?></th>
409
+ <td>
410
+ <input type="checkbox" name="options[notfound]" value="1" <?php echo $options['notfound']?'checked':''; ?>/>
411
+ </td>
412
+ </tr>
413
+
414
+ <tr valign="top">
415
+ <th><?php _e('Strip query string', 'hyper-cache'); ?></th>
416
+ <td>
417
+ <input type="checkbox" name="options[strip_qs]" value="1" <?php echo $options['strip_qs']?'checked':''; ?>/>
418
+ <div class="hints">
419
+ <?php _e('This is a really special case, usually you have to kept it disabled. When enabled, URL with query string will be
420
+ reduced removing the query string. So the URL http://www.domain.com/post-title and
421
+ http://www.domain.com/post-title?a=b&amp;c=d are cached as a single page.<br />
422
+ Setting this option disable the next one.', 'hyper-cache'); ?>
423
+ <br />
424
+ <?php _e('<strong>Many plugins can stop to work correctly with this option enabled
425
+ (eg. my <a href="http://www.satollo.net/plugins/newsletter">Newsletter plugin</a>)</strong>', 'hyper-cache'); ?>
426
+ </div>
427
+ </td>
428
+ </tr>
429
+
430
  <tr valign="top">
431
  <th><?php _e('URL with parameters', 'hyper-cache'); ?></th>
432
  <td>
433
  <input type="checkbox" name="options[cache_qs]" value="1" <?php echo $options['cache_qs']?'checked':''; ?>/>
434
+ <div class="hints">
435
  <?php _e('Cache requests with query string (parameters).', 'hyper-cache'); ?>
436
  <?php _e('This option has to be enabled for blogs which have post URLs with a question mark on them.', 'hyper-cache'); ?>
437
  <?php _e('This option is disabled by default because there is plugins which use
438
  URL parameter to perform specific action that cannot be cached', 'hyper-cache'); ?>
439
  <?php _e('For who is using search engines friendly permalink format is safe to
440
  leave this option disabled, no performances will be lost.', 'hyper-cache'); ?>
441
+ </div>
442
  </td>
443
  </tr>
444
 
445
+ <tr valign="top">
446
+ <th><?php _e('Allow browser to bypass cache', 'hyper-cache'); ?></th>
447
+ <td>
448
+ <input type="checkbox" name="options[nocache]" value="1" <?php echo $options['nocache']?'checked':''; ?>/>
449
+ <div class="hints">
450
+ <?php _e('Do not use cache if browser sends no-cache header (e.g. on explicit page reload).','hyper-cache'); ?>
451
+ </div>
452
+ </td>
453
+ </tr>
454
+ </table>
455
+
456
+
457
+ <h3><?php _e('Filters', 'hyper-cache'); ?></h3>
458
+ <p>
459
+ <?php _e('Here you can: exclude pages and posts from the cache, specifying their address (URI); disable Hyper Cache for specific
460
+ User Agents (browsers, bot, mobile devices, ...); disable the cache for users that have specific cookies.', 'hyper-cache'); ?>
461
+ </p>
462
+
463
+ <table class="form-table">
464
  <tr valign="top">
465
  <th><?php _e('URI to reject', 'hyper-cache'); ?></th>
466
  <td>
467
  <textarea wrap="off" rows="5" cols="70" name="options[reject]"><?php echo htmlspecialchars($options['reject']); ?></textarea>
468
+ <div class="hints">
469
  <?php _e('Write one URI per line, each URI has to start with a slash.', 'hyper-cache'); ?>
470
  <?php _e('A specified URI will match the requested URI if the latter starts with the former.', 'hyper-cache'); ?>
471
  <?php _e('If you want to specify a stric matching, surround the URI with double quotes.', 'hyper-cache'); ?>
483
  foreach($languages as $l) echo $base . '/' . $l . '/ ';
484
  }
485
  ?>
486
+ </div>
487
  </td>
488
  </tr>
489
 
491
  <th><?php _e('Agents to reject', 'hyper-cache'); ?></th>
492
  <td>
493
  <textarea wrap="off" rows="5" cols="70" name="options[reject_agents]"><?php echo htmlspecialchars($options['reject_agents']); ?></textarea>
494
+ <div class="hints">
495
  <?php _e('Write one agent per line.', 'hyper-cache'); ?>
496
  <?php _e('A specified agent will match the client agent if the latter contains the former. The matching is case insensitive.', 'hyper-cache'); ?>
497
+ </div>
498
  </td>
499
  </tr>
500
 
502
  <th><?php _e('Cookies matching', 'hyper-cache'); ?></th>
503
  <td>
504
  <textarea wrap="off" rows="5" cols="70" name="options[reject_cookies]"><?php echo htmlspecialchars($options['reject_cookies']); ?></textarea>
505
+ <div class="hints">
506
  <?php _e('Write one cookie name per line.', 'hyper-cache'); ?>
507
  <?php _e('When a specified cookie will match one of the cookie names sent bby the client the cache stops.', 'hyper-cache'); ?>
508
  <?php if (defined('FBC_APP_KEY_OPTION')) { ?>
512
  <br />
513
  <strong><?php echo get_option(FBC_APP_KEY_OPTION); ?>_user</strong>
514
  <?php } ?>
515
+ </div>
516
  </td>
517
  </tr>
518
 
plugin.php CHANGED
@@ -2,16 +2,15 @@
2
  /*
3
  Plugin Name: Hyper Cache
4
  Plugin URI: http://www.satollo.net/plugins/hyper-cache
5
- Description: Hyper Cache is a features rich cache system WordPress. After an upgrade, DEACTIVATE, REACTIVATE and RECONFIGURE. ALWAYS!
6
- Version: 2.4.3
7
- Author: Satollo
 
8
  Author URI: http://www.satollo.net
9
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
10
 
11
- ---
12
- Copyright 2008 Satollo (email : info@satollo.net)
13
- ---
14
-
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
17
  the Free Software Foundation; either version 2 of the License, or
@@ -26,275 +25,263 @@ You should have received a copy of the GNU General Public License
26
  along with this program; if not, write to the Free Software
27
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
 
29
- ---
30
- Changelog
31
- ---
32
-
33
- See the readme.txt.
34
-
35
  */
36
 
37
- $hyper_options = get_option('hyper');
38
  $hyper_invalidated = false;
39
  $hyper_invalidated_post_id = null;
40
 
 
41
  // On activation, we try to create files and directories. If something goes wrong
42
  // (eg. for wrong permission on file system) the options page will give a
43
  // warning.
44
- add_action('activate_hyper-cache/plugin.php', 'hyper_activate');
45
- function hyper_activate()
46
  {
47
- @mkdir(ABSPATH . 'wp-content/hyper-cache', 0766);
48
-
49
- $buffer = file_get_contents(dirname(__FILE__) . '/advanced-cache.php');
50
- $file = @fopen(ABSPATH . 'wp-content/advanced-cache.php', 'wb');
51
- if ($file)
52
- {
53
- fwrite($file, $buffer);
54
- fclose($file);
 
 
 
 
 
 
 
 
55
  }
56
- }
57
 
 
 
 
 
58
 
59
- add_action('deactivate_hyper-cache/plugin.php', 'hyper_deactivate');
60
- function hyper_deactivate()
 
 
 
 
 
61
  {
62
- @unlink(ABSPATH . 'wp-content/advanced-cache.php');
63
- @unlink(ABSPATH . 'wp-content/hyper-cache-config.php');
 
 
64
 
65
- // We can safely delete the hyper-cache directory, is not more used at this time.
66
- hyper_delete_path(ABSPATH . 'wp-content/hyper-cache');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
69
- add_filter("plugin_action_links_hyper-cache/plugin.php", 'hyper_plugin_action_links');
70
- function hyper_plugin_action_links($links)
71
- {
72
- $settings_link = '<a href="options-general.php?page=hyper-cache/options.php">' . __( 'Settings' ) . '</a>';
73
- array_unshift($links, $settings_link);
74
- return $links;
 
 
 
 
 
 
75
  }
76
 
77
  add_action('admin_menu', 'hyper_admin_menu');
78
- function hyper_admin_menu()
79
  {
80
- add_options_page('Hyper Cache', 'Hyper Cache', 'manage_options', 'hyper-cache/options.php');
81
  }
82
 
83
  // Completely invalidate the cache. The hyper-cache directory is renamed
84
  // with a random name and re-created to be immediately available to the cache
85
  // system. Then the renamed directory is removed.
86
  // If the cache has been already invalidated, the function doesn't anything.
87
- function hyper_cache_invalidate()
88
  {
89
- global $hyper_options, $hyper_invalidated;
90
-
91
- //hyper_log("Called global invalidate");
92
- if ($hyper_invalidated)
 
93
  {
94
- //hyper_log("Already invalidated");
95
  return;
96
  }
97
-
 
 
 
 
 
 
 
 
 
98
  $hyper_invalidated = true;
99
- //$path = ABSPATH . 'wp-content/' . time();
100
- //rename(ABSPATH . 'wp-content/hyper-cache', $path);
101
- //mkdir(ABSPATH . 'wp-content/hyper-cache', 0766);
102
- hyper_delete_path(ABSPATH . 'wp-content/hyper-cache');
103
- }
104
 
105
- function hyper_cache_invalidate_post($post_id)
106
- {
107
- //hyper_log("Called post invalidate for post id $post_id");
108
- hyper_delete_by_post($post_id);
109
  }
110
 
111
- function hyper_cache_invalidate_post_status($new, $old, $post)
 
 
 
 
112
  {
113
- global $hyper_invalidated;
114
-
115
- $post_id = $post->ID;
116
- //hyper_log("Called post status invalidate for post id $post_id from $old to $new");
117
 
118
- // The post is going online or offline
119
- if ($new != 'publish' && $old != 'publish') return;
120
 
121
- //hyper_log("Start global invalidation");
122
-
123
- if ($hyper_invalidated)
124
  {
125
- hyper_log("Already invalidated");
126
  return;
127
  }
128
-
129
- $hyper_invalidated = true;
130
- //$path = ABSPATH . 'wp-content/' . time();
131
- //rename(ABSPATH . 'wp-content/hyper-cache', $path);
132
- //mkdir(ABSPATH . 'wp-content/hyper-cache', 0766);
133
- hyper_delete_path(ABSPATH . 'wp-content/hyper-cache');
134
- }
135
 
136
- function hyper_cache_invalidate_comment($comment_id, $status=1)
137
- {
138
- //hyper_log("Called comment invalidate for comment id $comment_id and status $status");
139
- if ($status != 1) return;
140
- hyper_delete_by_comment($comment_id);
141
- //hyper_cache_invalidate();
142
- }
143
 
144
- function hyper_delete_by_comment($comment_id)
145
- {
146
- $comment = get_comment($comment_id);
147
- $post_id = $comment->comment_post_ID;
148
- hyper_delete_by_post($post_id);
149
- }
150
-
151
- // Delete files in the cache based only on a post id. Only the post cached
152
- // page is deleted (with its mobile versions) and the home page of the blog.
153
- // If the cache has been already invalidated, of the specified post has already
154
- // been invalidate the function return doing nothing. This behaviour protect
155
- // from multi invalidation caused by actions fired by WP.
156
- // The invalidation doesn't take place is the post is not in "publish" status.
157
- function hyper_delete_by_post($post_id)
158
- {
159
- global $hyper_invalidated_post_id, $hyper_invalidated;
160
-
161
- if ($hyper_invalidated)
162
  {
163
- //hyper_log("Already invalidated");
164
  return;
165
  }
166
- if ($hyper_invalidated_post_id == $post_id)
 
167
  {
168
- //hyper_log("Already invalidated post id $post_id");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  return;
170
  }
171
-
172
- $post = get_post($post_id);
173
- //hyper_log("Post status " . $post->post_status);
174
- if ($post->post_status != 'publish')
175
  {
 
 
176
  return;
177
  }
178
- $hyper_invalidated_post_id = $post_id;
179
-
180
- // Post invalidation
181
- $link = get_permalink($post_id);
182
- //$link = substr($link, strpos($link, '/', 7));
183
- $link = substr($link, 7);
184
- $file = md5($link);
185
-
186
- @unlink(ABSPATH . 'wp-content/hyper-cache/' . $file . '.dat');
187
- @unlink(ABSPATH . 'wp-content/hyper-cache/pda' . $file . '.dat');
188
- @unlink(ABSPATH . 'wp-content/hyper-cache/iphone' . $file . '.dat');
189
-
190
- // Home invalidation
191
- $link = substr(get_option('home'), 7) . '/';
192
- $file = md5($link);
193
-
194
- @unlink(ABSPATH . 'wp-content/hyper-cache/' . $file . '.dat');
195
- @unlink(ABSPATH . 'wp-content/hyper-cache/pda' . $file . '.dat');
196
- @unlink(ABSPATH . 'wp-content/hyper-cache/iphone' . $file . '.dat');
197
  }
198
 
 
199
  // Completely remove a directory and it's content.
200
- function hyper_delete_path($path)
201
  {
202
  if ($path == null) return;
203
-
204
- if ($handle = @opendir($path))
205
  {
206
- while ($file = readdir($handle))
207
  {
208
- if ($file != '.' && $file != '..')
209
  {
210
- @unlink($path . '/' . $file);
211
- }
212
- }
213
- closedir($handle);
214
- //@rmdir($path);
215
- }
216
  }
217
 
218
  // Counts the number of file in to the hyper cache directory to give an idea of
219
  // the number of pages cached.
220
- function hyper_count()
221
  {
222
  $count = 0;
223
  //if (!is_dir(ABSPATH . 'wp-content/hyper-cache')) return 0;
224
- if ($handle = @opendir(ABSPATH . 'wp-content/hyper-cache'))
225
  {
226
- while ($file = readdir($handle))
227
  {
228
- if ($file != '.' && $file != '..')
229
  {
230
- $count++;
231
- }
232
- }
233
- closedir($handle);
234
- }
235
  return $count;
236
  }
237
 
238
- // Intercepts the action that can trigger a cache invalidation if the cache system is enabled
239
- // and invalidation is asked for actions (if is not only based on cache timeout)
240
- if ($hyper_options['expire_type'] != 'none')
241
- {
242
-
243
- // We need to invalidate everything for those actions because home page, categories pages,
244
- // tags pages are affected and generally if we use plugin that print out "latest posts"
245
- // or so we cannot know if a deleted post appears on every page.
246
- add_action('switch_theme', 'hyper_cache_invalidate', 0);
247
-
248
- // When a post is modified and we want to expire only it's page we listen for
249
- // post edit (called everytime a post is modified, even if a comment is added) and
250
- // the status change. We invalidate the single post if it's status is publish, we
251
- // invalidate all the cache if the status change from publish to "not publish" or
252
- // from "not publish" to publish. These two cases make a post to appear or disappear
253
- // anc can affect home, categories, single pages with a posts list, ...
254
- if ($hyper_options['expire_type'] != 'all')
255
- {
256
- add_action('edit_post', 'hyper_cache_invalidate_post', 0);
257
- add_action('delete_post', 'hyper_cache_invalidate_post', 0);
258
- if ($hyper_options['expire_type'] == 'post')
259
- {
260
- // The post and all cache on publishing
261
- add_action('transition_post_status', 'hyper_cache_invalidate_post_status', 0, 3);
262
- }
263
- else
264
- {
265
- // Strictly
266
- add_action('edit_post', 'hyper_cache_invalidate_post', 0);
267
- }
268
- }
269
- else
270
- {
271
- // If a complete invalidation is required, we do it on post edit.
272
- add_action('edit_post', 'hyper_cache_invalidate', 0);
273
- add_action('delete_post', 'hyper_cache_invalidate', 0);
274
- }
275
 
276
- // When a comment is received, and it's status is approved, the reference
277
- // post is modified, but even other pages can be affected (last comments list,
278
- // comment count and so on). We don't care about the latter situation when
279
- // the expire type is configured to invalidate the single post page.
280
- // Surely some of those hooks are redundant. When a new comment is added (and
281
- // approved) the action "edit_post" is fired (llok at the code before). I need
282
- // to deeply check this code BUT the plugin is protected from redundant invalidations.
283
- if ($hyper_options['expire_type'] != 'all')
284
- {
285
- add_action('comment_post', 'hyper_cache_invalidate_comment', 10, 2);
286
- add_action('edit_comment', 'hyper_cache_invalidate_comment', 0);
287
- add_action('wp_set_comment_status', 'hyper_cache_invalidate_comment', 0);
288
- add_action('delete_comment', 'hyper_cache_invalidate_comment', 0);
289
- }
290
- else
291
- {
292
- add_action('comment_post', 'hyper_cache_invalidate', 0);
293
- add_action('edit_comment', 'hyper_cache_invalidate', 0);
294
- add_action('wp_set_comment_status', 'hyper_cache_invalidate', 0);
295
- add_action('delete_comment', 'hyper_cache_invalidate', 0);
296
- }
297
- }
298
 
299
 
300
  // Capture and register if a redirect is sent back from WP, so the cache
@@ -308,15 +295,162 @@ function hyper_redirect_canonical($redirect_url, $requested_url)
308
  global $hyper_redirect;
309
 
310
  $hyper_redirect = $redirect_url;
311
-
312
  return $redirect_url;
313
  }
314
 
315
- function hyper_log($text)
316
  {
317
- $file = fopen(dirname(__FILE__) . '/plugin.log', 'a');
318
- fwrite($file, $text . "\n");
319
- fclose($file);
320
  }
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  ?>
2
  /*
3
  Plugin Name: Hyper Cache
4
  Plugin URI: http://www.satollo.net/plugins/hyper-cache
5
+ Description: Hyper Cache is a cache system for WordPress to improve it's perfomances and save resources. <a href="http://www.satollo.net/plugins/hyper-cache" target="_blank">Hyper Cache official page</a>. To manually upgrade remember the sequence: deactivate, update, reactivate.
6
+ Version: 2.9.1.6
7
+ Text Domain: hyper-cache
8
+ Author: Stefano Lissa
9
  Author URI: http://www.satollo.net
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
11
 
12
+ Copyright 2011 Satollo (email : info@satollo.net)
13
+
 
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
16
  the Free Software Foundation; either version 2 of the License, or
25
  along with this program; if not, write to the Free Software
26
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
 
 
 
 
 
 
 
28
  */
29
 
 
30
  $hyper_invalidated = false;
31
  $hyper_invalidated_post_id = null;
32
 
33
+
34
  // On activation, we try to create files and directories. If something goes wrong
35
  // (eg. for wrong permission on file system) the options page will give a
36
  // warning.
37
+ register_activation_hook(__FILE__, 'hyper_activate');
38
+ function hyper_activate()
39
  {
40
+ $options = get_option('hyper');
41
+
42
+ wp_clear_scheduled_hook('hyper_clean');
43
+
44
+ if (!is_array($options)) {
45
+ $options = array();
46
+ $options['comment'] = 1;
47
+ $options['archive'] = 1;
48
+ $options['timeout'] = 1440;
49
+ $options['redirects'] = 1;
50
+ $options['notfound'] = 1;
51
+ $options['clean_interval'] = 60;
52
+ $options['gzip'] = 1;
53
+ $options['store_compressed'] = 1;
54
+ $options['expire_type'] = 'post';
55
+ update_option('hyper', $options);
56
  }
 
57
 
58
+ $buffer = hyper_generate_config($options);
59
+ $file = @fopen(WP_CONTENT_DIR . '/advanced-cache.php', 'wb');
60
+ @fwrite($file, $buffer);
61
+ @fclose($file);
62
 
63
+ wp_mkdir_p(WP_CONTENT_DIR . '/cache/hyper-cache');
64
+
65
+ wp_schedule_event(time()+300, 'hourly', 'hyper_clean');
66
+ }
67
+
68
+ add_action('hyper_clean', 'hyper_clean');
69
+ function hyper_clean()
70
  {
71
+ // Latest global invalidation (may be false)
72
+ $invalidation_time = @filemtime(WP_CONTENT_DIR . '/cache/hyper-cache/_global.dat');
73
+
74
+ hyper_log('start cleaning');
75
 
76
+ $options = get_option('hyper');
77
+
78
+ $timeout = $options['timeout']*60;
79
+ if ($timeout == 0) return;
80
+
81
+ $path = WP_CONTENT_DIR . '/cache/hyper-cache';
82
+ $time = time();
83
+
84
+ $handle = @opendir($path);
85
+ if (!$handle) {
86
+ hyper_log('unable to open cache dir');
87
+ return;
88
+ }
89
+
90
+ while ($file = readdir($handle)) {
91
+ if ($file == '.' || $file == '..' || $file[0] == '_') continue;
92
+
93
+ hyper_log('checking ' . $file . ' for cleaning');
94
+ $t = @filemtime($path . '/' . $file);
95
+ hyper_log('file time ' . $t);
96
+ if ($time - $t > $timeout || ($invalidation_time && $t < $invalidation_time)) {
97
+ @unlink($path . '/' . $file);
98
+ hyper_log('cleaned ' . $file);
99
+ }
100
+ }
101
+ closedir($handle);
102
+
103
+ hyper_log('end cleaning');
104
  }
105
 
106
+ register_deactivation_hook(__FILE__, 'hyper_deactivate');
107
+ function hyper_deactivate()
108
+ {
109
+ wp_clear_scheduled_hook('hyper_clean');
110
+
111
+ // burn the file without delete it so one can rewrite it
112
+ $file = @fopen(WP_CONTENT_DIR . '/advanced-cache.php', 'wb');
113
+ if ($file)
114
+ {
115
+ @fwrite($file, '');
116
+ @fclose($file);
117
+ }
118
  }
119
 
120
  add_action('admin_menu', 'hyper_admin_menu');
121
+ function hyper_admin_menu()
122
  {
123
+ add_options_page('Hyper Cache', 'Hyper Cache', 'manage_options', 'hyper-cache/options.php');
124
  }
125
 
126
  // Completely invalidate the cache. The hyper-cache directory is renamed
127
  // with a random name and re-created to be immediately available to the cache
128
  // system. Then the renamed directory is removed.
129
  // If the cache has been already invalidated, the function doesn't anything.
130
+ function hyper_cache_invalidate()
131
  {
132
+ global $hyper_invalidated;
133
+
134
+ hyper_log("hyper_cache_invalidate> Called");
135
+
136
+ if ($hyper_invalidated)
137
  {
138
+ hyper_log("hyper_cache_invalidate> Cache already invalidated");
139
  return;
140
  }
141
+
142
+ if (!@touch(WP_CONTENT_DIR . '/cache/hyper-cache/_global.dat'))
143
+ {
144
+ hyper_log("hyper_cache_invalidate> Unable to touch cache/_global.dat");
145
+ }
146
+ else
147
+ {
148
+ hyper_log("hyper_cache_invalidate> Touched cache/_global.dat");
149
+ }
150
+ @unlink(WP_CONTENT_DIR . '/cache/hyper-cache/_archives.dat');
151
  $hyper_invalidated = true;
 
 
 
 
 
152
 
 
 
 
 
153
  }
154
 
155
+ /**
156
+ * Invalidates a single post and eventually the home and archives if
157
+ * required.
158
+ */
159
+ function hyper_cache_invalidate_post($post_id)
160
  {
161
+ global $hyper_invalidated_post_id;
 
 
 
162
 
163
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Called");
 
164
 
165
+ if ($hyper_invalidated_post_id == $post_id)
 
 
166
  {
167
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Post was already invalidated");
168
  return;
169
  }
 
 
 
 
 
 
 
170
 
171
+ $options = get_option('hyper');
 
 
 
 
 
 
172
 
173
+ if ($options['expire_type'] == 'none')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  {
175
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Invalidation disabled");
176
  return;
177
  }
178
+
179
+ if ($options['expire_type'] == 'post')
180
  {
181
+ $post = get_post($post_id);
182
+
183
+ $link = get_permalink($post_id);
184
+ hyper_log('Permalink to invalidate ' . $link);
185
+ // Remove 'http://', and for wordpress 'pretty URLs' strip trailing slash (e.g. 'http://my-site.com/my-post/' -> 'my-site.com/my-post')
186
+ // The latter ensures existing cache files are still used if a wordpress admin just adds/removes a trailing slash to/from the permalink format
187
+ //$link = substr($link, 7);
188
+ $link = preg_replace( '~^.*?://~', '', $link );
189
+ hyper_log('Corrected permalink to invalidate ' . $link);
190
+ $file = md5($link);
191
+ hyper_log('File basename to invalidate ' . $file);
192
+
193
+ $path = WP_CONTENT_DIR . '/cache/hyper-cache';
194
+ $handle = @opendir($path);
195
+ if ($handle)
196
+ {
197
+ while ($f = readdir($handle))
198
+ {
199
+ if (substr($f, 0, 32) == $file)
200
+ {
201
+ if (unlink($path . '/' . $f)) {
202
+ hyper_log('Deleted ' . $path . '/' . $f);
203
+ }
204
+ else {
205
+ hyper_log('Unable to delete ' . $path . '/' . $f);
206
+ }
207
+ }
208
+ }
209
+ closedir($handle);
210
+ }
211
+
212
+ $hyper_invalidated_post_id = $post_id;
213
+
214
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Post invalidated");
215
+
216
+ if ($options['archive'])
217
+ {
218
+
219
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Archive invalidation required");
220
+
221
+ if (!@touch(WP_CONTENT_DIR . '/cache/hyper-cache/_archives.dat'))
222
+ {
223
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Unable to touch cache/_archives.dat");
224
+ }
225
+ else
226
+ {
227
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Touched cache/_archives.dat");
228
+ }
229
+ }
230
  return;
231
  }
232
+
233
+ if ($options['expire_type'] == 'all')
 
 
234
  {
235
+ hyper_log("hyper_cache_invalidate_post(" . $post_id . ")> Full invalidation");
236
+ hyper_cache_invalidate();
237
  return;
238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  }
240
 
241
+
242
  // Completely remove a directory and it's content.
243
+ function hyper_delete_path($path)
244
  {
245
  if ($path == null) return;
246
+ $handle = @opendir($path);
247
+ if ($handle)
248
  {
249
+ while ($file = readdir($handle))
250
  {
251
+ if ($file != '.' && $file != '..')
252
  {
253
+ @unlink($path . '/' . $file);
254
+ }
255
+ }
256
+ closedir($handle);
257
+ }
 
258
  }
259
 
260
  // Counts the number of file in to the hyper cache directory to give an idea of
261
  // the number of pages cached.
262
+ function hyper_count()
263
  {
264
  $count = 0;
265
  //if (!is_dir(ABSPATH . 'wp-content/hyper-cache')) return 0;
266
+ if ($handle = @opendir(WP_CONTENT_DIR . '/cache/hyper-cache'))
267
  {
268
+ while ($file = readdir($handle))
269
  {
270
+ if ($file != '.' && $file != '..')
271
  {
272
+ $count++;
273
+ }
274
+ }
275
+ closedir($handle);
276
+ }
277
  return $count;
278
  }
279
 
280
+ add_action('switch_theme', 'hyper_cache_invalidate', 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
 
282
+ add_action('edit_post', 'hyper_cache_invalidate_post', 0);
283
+ add_action('publish_post', 'hyper_cache_invalidate_post', 0);
284
+ add_action('delete_post', 'hyper_cache_invalidate_post', 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
 
286
 
287
  // Capture and register if a redirect is sent back from WP, so the cache
295
  global $hyper_redirect;
296
 
297
  $hyper_redirect = $redirect_url;
298
+
299
  return $redirect_url;
300
  }
301
 
302
+ function hyper_log($text)
303
  {
304
+ // $file = fopen(ABSPATH . '/log.txt', 'a');
305
+ // fwrite($file, $text . "\n");
306
+ // fclose($file);
307
  }
308
 
309
+ function hyper_generate_config(&$options)
310
+ {
311
+ $buffer = '';
312
+
313
+ $timeout = $options['timeout']*60;
314
+ if ($timeout == 0) $timeout = 2000000000;
315
+
316
+ $buffer = "<?php\n";
317
+ $buffer .= '$hyper_cache_path = \'' . WP_CONTENT_DIR . '/cache/hyper-cache/\'' . ";\n";
318
+ $buffer .= '$hyper_cache_charset = "' . get_option('blog_charset') . '"' . ";\n";
319
+ // Collect statistics
320
+ //$buffer .= '$hyper_cache_stats = ' . (isset($options['stats'])?'true':'false') . ";\n";
321
+ // Do not cache for commenters
322
+ $buffer .= '$hyper_cache_comment = ' . (isset($options['comment'])?'true':'false') . ";\n";
323
+ // Ivalidate archives on post invalidation
324
+ $buffer .= '$hyper_cache_archive = ' . ($options['archive']?'true':'false') . ";\n";
325
+ // Single page timeout
326
+ $buffer .= '$hyper_cache_timeout = ' . ($timeout) . ";\n";
327
+ // Cache redirects?
328
+ $buffer .= '$hyper_cache_redirects = ' . (isset($options['redirects'])?'true':'false') . ";\n";
329
+ // Cache page not found?
330
+ $buffer .= '$hyper_cache_notfound = ' . (isset($options['notfound'])?'true':'false') . ";\n";
331
+ // Separate caching for mobile agents?
332
+ $buffer .= '$hyper_cache_mobile = ' . (isset($options['mobile'])?'true':'false') . ";\n";
333
+ // WordPress mobile pack integration?
334
+ $buffer .= '$hyper_cache_plugin_mobile_pack = ' . (isset($options['plugin_mobile_pack'])?'true':'false') . ";\n";
335
+ // Cache the feeds?
336
+ $buffer .= '$hyper_cache_feed = ' . (isset($options['feed'])?'true':'false') . ";\n";
337
+ // Cache GET request with parameters?
338
+ $buffer .= '$hyper_cache_cache_qs = ' . (isset($options['cache_qs'])?'true':'false') . ";\n";
339
+ // Strip query string?
340
+ $buffer .= '$hyper_cache_strip_qs = ' . (isset($options['strip_qs'])?'true':'false') . ";\n";
341
+ // DO NOT cache the home?
342
+ $buffer .= '$hyper_cache_home = ' . (isset($options['home'])?'true':'false') . ";\n";
343
+ // Disable last modified header
344
+ $buffer .= '$hyper_cache_lastmodified = ' . (isset($options['lastmodified'])?'true':'false') . ";\n";
345
+ // Allow browser caching?
346
+ $buffer .= '$hyper_cache_browsercache = ' . (isset($options['browsercache'])?'true':'false') . ";\n";
347
+ // Do not use cache if browser sends no-cache header?
348
+ $buffer .= '$hyper_cache_nocache = ' . (isset($options['nocache'])?'true':'false') . ";\n";
349
+
350
+ if ($options['gzip']) $options['store_compressed'] = 1;
351
+
352
+ $buffer .= '$hyper_cache_gzip = ' . (isset($options['gzip'])?'true':'false') . ";\n";
353
+ $buffer .= '$hyper_cache_gzip_on_the_fly = ' . (isset($options['gzip_on_the_fly'])?'true':'false') . ";\n";
354
+ $buffer .= '$hyper_cache_store_compressed = ' . (isset($options['store_compressed'])?'true':'false') . ";\n";
355
+
356
+ //$buffer .= '$hyper_cache_clean_interval = ' . ($options['clean_interval']*60) . ";\n";
357
+
358
+ if (isset($options['reject']) && trim($options['reject']) != '')
359
+ {
360
+ $options['reject'] = str_replace(' ', "\n", $options['reject']);
361
+ $options['reject'] = str_replace("\r", "\n", $options['reject']);
362
+ $buffer .= '$hyper_cache_reject = array(';
363
+ $reject = explode("\n", $options['reject']);
364
+ $options['reject'] = '';
365
+ foreach ($reject as $uri)
366
+ {
367
+ $uri = trim($uri);
368
+ if ($uri == '') continue;
369
+ $buffer .= "\"" . addslashes(trim($uri)) . "\",";
370
+ $options['reject'] .= $uri . "\n";
371
+ }
372
+ $buffer = rtrim($buffer, ',');
373
+ $buffer .= ");\n";
374
+ }
375
+ else {
376
+ $buffer .= '$hyper_cache_reject = false;' . "\n";
377
+ }
378
+
379
+ if (isset($options['reject_agents']) && trim($options['reject_agents']) != '')
380
+ {
381
+ $options['reject_agents'] = str_replace(' ', "\n", $options['reject_agents']);
382
+ $options['reject_agents'] = str_replace("\r", "\n", $options['reject_agents']);
383
+ $buffer .= '$hyper_cache_reject_agents = array(';
384
+ $reject_agents = explode("\n", $options['reject_agents']);
385
+ $options['reject_agents'] = '';
386
+ foreach ($reject_agents as $uri)
387
+ {
388
+ $uri = trim($uri);
389
+ if ($uri == '') continue;
390
+ $buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
391
+ $options['reject_agents'] .= $uri . "\n";
392
+ }
393
+ $buffer = rtrim($buffer, ',');
394
+ $buffer .= ");\n";
395
+ }
396
+ else {
397
+ $buffer .= '$hyper_cache_reject_agents = false;' . "\n";
398
+ }
399
+
400
+ if (isset($options['reject_cookies']) && trim($options['reject_cookies']) != '')
401
+ {
402
+ $options['reject_cookies'] = str_replace(' ', "\n", $options['reject_cookies']);
403
+ $options['reject_cookies'] = str_replace("\r", "\n", $options['reject_cookies']);
404
+ $buffer .= '$hyper_cache_reject_cookies = array(';
405
+ $reject_cookies = explode("\n", $options['reject_cookies']);
406
+ $options['reject_cookies'] = '';
407
+ foreach ($reject_cookies as $c)
408
+ {
409
+ $c = trim($c);
410
+ if ($c == '') continue;
411
+ $buffer .= "\"" . addslashes(strtolower(trim($c))) . "\",";
412
+ $options['reject_cookies'] .= $c . "\n";
413
+ }
414
+ $buffer = rtrim($buffer, ',');
415
+ $buffer .= ");\n";
416
+ }
417
+ else {
418
+ $buffer .= '$hyper_cache_reject_cookies = false;' . "\n";
419
+ }
420
+
421
+ if (isset($options['mobile']))
422
+ {
423
+ if (!isset($options['mobile_agents']) || trim($options['mobile_agents']) == '')
424
+ {
425
+ $options['mobile_agents'] = "elaine/3.0\niphone\nipod\npalm\neudoraweb\nblazer\navantgo\nwindows ce\ncellphone\nsmall\nmmef20\ndanger\nhiptop\nproxinet\nnewt\npalmos\nnetfront\nsharp-tq-gx10\nsonyericsson\nsymbianos\nup.browser\nup.link\nts21i-10\nmot-v\nportalmmm\ndocomo\nopera mini\npalm\nhandspring\nnokia\nkyocera\nsamsung\nmotorola\nmot\nsmartphone\nblackberry\nwap\nplaystation portable\nlg\nmmp\nopwv\nsymbian\nepoc";
426
+ }
427
+
428
+ if (trim($options['mobile_agents']) != '')
429
+ {
430
+ $options['mobile_agents'] = str_replace(',', "\n", $options['mobile_agents']);
431
+ $options['mobile_agents'] = str_replace("\r", "\n", $options['mobile_agents']);
432
+ $buffer .= '$hyper_cache_mobile_agents = array(';
433
+ $mobile_agents = explode("\n", $options['mobile_agents']);
434
+ $options['mobile_agents'] = '';
435
+ foreach ($mobile_agents as $uri)
436
+ {
437
+ $uri = trim($uri);
438
+ if ($uri == '') continue;
439
+ $buffer .= "\"" . addslashes(strtolower(trim($uri))) . "\",";
440
+ $options['mobile_agents'] .= $uri . "\n";
441
+ }
442
+ $buffer = rtrim($buffer, ',');
443
+ $buffer .= ");\n";
444
+ }
445
+ else
446
+ {
447
+ $buffer .= '$hyper_cache_mobile_agents = false;' . "\n";
448
+ }
449
+ }
450
+
451
+ $buffer .= "include(WP_CONTENT_DIR . '/plugins/hyper-cache/cache.php');\n";
452
+ $buffer .= '?>';
453
+
454
+ return $buffer;
455
+ }
456
  ?>
readme.txt CHANGED
@@ -1,18 +1,25 @@
1
  === Hyper Cache ===
2
- Tags: cache,chaching,speed,performance,super cache,wp cache
3
- Requires at least: 2.1
4
- Tested up to: 2.8.4
5
  Stable tag: trunk
6
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
7
- Contributors: satollo,momo360modena
8
 
9
- Hyper Cache is flexyble and easy cache system for WordPress.
10
 
11
  == Description ==
12
 
13
  Hyper Cache is a new cache system for WordPress, specifically written for
14
- people which have their blogs on *low resources hosting provider*
15
- (cpu and mysql).
 
 
 
 
 
 
 
 
16
 
17
  Some features:
18
 
@@ -24,15 +31,22 @@ Some features:
24
  * easy to configure
25
  * Global Translator compatibility
26
  * Last Modified http header compatibility with 304 responses
 
 
 
 
 
 
27
 
28
- More can be read on the [official plugin page](http://www.satollo.com/english/wordpress/hyper-cache) and write me
29
- if you have issues to info@satollo.com.
 
30
 
31
  **Check out my other plugins**:
32
 
33
  * [Post Layout](http://www.satollo.net/plugins/post-layout "Post Layout WordPress plugin: the easy way to enrich your posts")
34
  * [Comment Notifier](http://www.satollo.net/plugins/comment-notifier "Keep your blog discussions on fire")
35
- * [Feed Layout](http://www.satollo.com/english/wordpress/feed-layout "Feed Layout WordPress plugin: the easy way to enrich your feed contents")
36
  * [Dynatags](http://www.satollo.net/plugins/dynatags "Dynatags WordPress plugin: Create your own custom short tag in seconds")
37
  * [Header and Footer](http://www.satollo.net/plugins/header-footer)
38
  * [Newsletter](http://www.satollo.net/plugins/newsletter)
@@ -46,6 +60,11 @@ Thanks to:
46
  * Gene Steinberg to ask for an autoclean system
47
  * Marcis Gasun (fatcow.com) for Bielorussian translation
48
  * many others I don't remember
 
 
 
 
 
49
 
50
  == Installation ==
51
 
@@ -57,20 +76,105 @@ Before upgrade DEACTIVATE the plugin and then ACTIVATE and RECONFIGURE!
57
 
58
  == Frequently Asked Questions ==
59
 
60
- **How can I submit a bug?**
 
 
 
 
61
 
62
- Write me to info@satollo.com, please, it's the quicker way to have it fixed. You can write to the
63
- WordPress forum, too, but I read it rarely.
64
 
65
- **Where can I find versions history?**
66
 
67
- On this page: [Post Layout versions](http://www.satollo.com/english/wordpress/post-layout/versions).
68
 
69
- **Other FAQs?**
70
 
71
- I'm collection tips and FAQ on [this page](http://www.satollo.com/english/wordpress/hyper-cache/configuration)
72
- so I can update it more easly.
73
-
74
- == Screenshots ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
- No screenshots are available.
1
  === Hyper Cache ===
2
+ Tags: cache,chaching,speed,performance,super cache,wp cache,optimization,staticization
3
+ Requires at least: 2.5
4
+ Tested up to: 3.8.1
5
  Stable tag: trunk
6
+ Donate link: http://www.satollo.net/donations
 
7
 
8
+ Hyper Cache is flexible and easy to configure cache system for WordPress.
9
 
10
  == Description ==
11
 
12
  Hyper Cache is a new cache system for WordPress, specifically written for
13
+ people which have their blogs on low resources hosting provider
14
+ (cpu and mysql). It works even with hosting based on Microsoft IIS (just tuning
15
+ the configuration). It has three invalidation method: all the cache, single post
16
+ based and nothing but with control on home and archive pages invalidation.
17
+
18
+ It has not yet tested for multisite configuration (WordPress 3.0 feature).
19
+
20
+ An alternative to Hyper Cache is Lite Cache which probably is simpler to configure but
21
+ with the same performace level. Lite Cache is able to cache pages for commenters, too,
22
+ which are usually excluded from other type of caches.
23
 
24
  Some features:
25
 
31
  * easy to configure
32
  * Global Translator compatibility
33
  * Last Modified http header compatibility with 304 responses
34
+ * compressed storage to reduce the disk space usage
35
+ * agents, urls and cookies based rejection configurable
36
+ * easy to integrated with other plugins
37
+
38
+ More can be read on the [official plugin page](http://www.satollo.net/plugins/hyper-cache) and write me
39
+ if you have issues to info@satollo.net.
40
 
41
+ New contributors policy: since in the pas I had problem with link to contributors sites, I removed
42
+ them but I would like to add a reference to profile pages of contributors on WordPress, Twitter,
43
+ Facebook, Google+. Those links should be safe.
44
 
45
  **Check out my other plugins**:
46
 
47
  * [Post Layout](http://www.satollo.net/plugins/post-layout "Post Layout WordPress plugin: the easy way to enrich your posts")
48
  * [Comment Notifier](http://www.satollo.net/plugins/comment-notifier "Keep your blog discussions on fire")
49
+ * [Feed Layout](http://www.satollo.net/plugins/feed-layout "Feed Layout WordPress plugin: the easy way to enrich your feed contents")
50
  * [Dynatags](http://www.satollo.net/plugins/dynatags "Dynatags WordPress plugin: Create your own custom short tag in seconds")
51
  * [Header and Footer](http://www.satollo.net/plugins/header-footer)
52
  * [Newsletter](http://www.satollo.net/plugins/newsletter)
60
  * Gene Steinberg to ask for an autoclean system
61
  * Marcis Gasun (fatcow.com) for Bielorussian translation
62
  * many others I don't remember
63
+ * Florian Höch
64
+ * Quentin
65
+ * Mckryak
66
+ * Tommy Tung alias Ragnarok
67
+
68
 
69
  == Installation ==
70
 
76
 
77
  == Frequently Asked Questions ==
78
 
79
+ See the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache)
80
+
81
+ == Screenshots ==
82
+
83
+ No screenshots are available.
84
 
85
+ == Changelog ==
 
86
 
87
+ = 2.9.1.6 =
88
 
89
+ * Fixed some debug noticies
90
 
91
+ = 2.9.1.5 =
92
 
93
+ * gzip path by Onno Molenkamp
94
+
95
+ = 2.9.1.4 =
96
+
97
+ * Added support for the static front page
98
+
99
+ = 2.9.1.3 =
100
+
101
+ * Added a check to remove a warning
102
+
103
+ = 2.9.1.2 =
104
+
105
+ * Fixed a file creation on activation
106
+
107
+ = 2.9.1.1 =
108
+
109
+ * fixed the new WP_CONTENT_DIR usage
110
+
111
+ = 2.9.1.0 =
112
+
113
+ * https fix by (http://foliovision.com)
114
+ * fixed the WP_CONTENT_DIR usage
115
+ * some "undefined index" notices because people and PHP pretend that an associative array should be checked for a key before asking for its content... (terrible and inefficient)
116
+ * cache path save with single quote to avoid problem with windows paths
117
+
118
+ = 2.9.0.3 =
119
+
120
+ * potential duplicated content fix
121
+
122
+ = 2.9.0.2 =
123
+
124
+ * added French translation
125
+
126
+ = 2.9.0.1 =
127
+
128
+ * small fix for trailing slashes
129
+
130
+ = 2.9.0 =
131
+
132
+ All patches listed below are by Florian Höch (as soon has his blog will be online I'll give a link to it)
133
+
134
+ * compression on the fly option when browser accept compressed data but is set to not store it
135
+ * added the Vary header
136
+ * fixed the Cache-Control/Expires and Last-Modified headers
137
+ * remove the trailing slash for permalink (even if WordPress should send a redirect and Hyper Cache should already intercept it)
138
+ * added a few safety checks for gzencode/decode functions in cache.php
139
+ * new configuration option: allow browser caching
140
+ * allow browser to bypass the server-side cache
141
+ * some options panel fixes and improvements
142
+
143
+ = 2.8.9 =
144
+
145
+ * TW and CN translations changed (by Ragnarok)
146
+
147
+ = 2.8.8 =
148
+
149
+ * Internationalization fixes
150
+
151
+ = 2.8.7 =
152
+
153
+ * Admin panel fixes
154
+ * Introduced the text domain (re-trnslation needed)
155
+
156
+ = 2.8.6 =
157
+
158
+ * Chinese translation by Ragnarok!
159
+
160
+ = 2.8.5 =
161
+
162
+ * fixed the "is_home" warning issue
163
+
164
+ = 2.8.4 =
165
+
166
+ * fixed the single page invalidation
167
+
168
+ = 2.8.3 =
169
+
170
+ * fixed the clean from admin panel
171
+
172
+ = 2.8.2 =
173
+
174
+ * moved the cache folder to wp-content/cache/hyper-cache
175
+ * configuration panel has no more expandable sections
176
+ * the cached pages are no more deleted on update
177
+
178
+ = 2.8.1 =
179
 
180
+ * fixed the Last Modified header (thanks Yuri C.)