Hyper Cache - Version 3.2.7

Version Description

  • Minor code review
  • Removed cookie based cache disabling
Download this release

Release Info

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

Code changes from version 3.1.8 to 3.2.7

advanced-cache.php CHANGED
@@ -39,11 +39,6 @@ if (defined('SID') && SID != '') {
39
  return false;
40
  }
41
 
42
- if (isset($_COOKIE['cache_disable'])) {
43
- $cache_stop = true;
44
- return false;
45
- }
46
-
47
  if (!$hyper_cache_is_bot || $hyper_cache_is_bot && !HC_BOTS_IGNORE_NOCACHE) {
48
  if (isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') {
49
  hyper_cache_header('stop - no cache header');
@@ -76,7 +71,7 @@ if (HC_HTTPS === 0 && $hyper_cache_is_ssl) {
76
  }
77
 
78
  if (HC_REJECT_AGENTS_ENABLED && isset($_SERVER['HTTP_USER_AGENT'])) {
79
- if (preg_match('#(HC_REJECT_AGENTS)#i', strtolower($_SERVER['HTTP_USER_AGENT']))) {
80
  hyper_cache_header('stop - user agent');
81
  $cache_stop = true;
82
  return false;
@@ -103,7 +98,7 @@ if (!empty($_COOKIE)) {
103
  return false;
104
  }
105
  if (HC_REJECT_COOKIES_ENABLED) {
106
- if (preg_match('#(HC_REJECT_COOKIES)#i', strtolower($n))) {
107
  hyper_cache_header('stop - bypass cookie');
108
  $cache_stop = true;
109
  return false;
@@ -125,8 +120,8 @@ if (HC_MOBILE === 1 && $hyper_cache_is_mobile) {
125
 
126
  //$hc_file = ABSPATH . 'wp-content/cache/lite-cache' . $_SERVER['REQUEST_URI'] . '/index' . $hc_group . '.html';
127
  $hc_uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
128
-
129
- $hc_file = 'HC_FOLDER/' . strtolower($_SERVER['HTTP_HOST']) . $hc_uri . '/index' . $hyper_cache_group . '.html';
130
  if (HC_GZIP == 1 && $hyper_cache_gzip_accepted) {
131
  $hc_gzip = true;
132
  } else {
@@ -181,11 +176,9 @@ if (HC_BROWSER_CACHE) {
181
  $hc_cache_max_age = time() + (24 * 3600) - $hc_file_time;
182
  }
183
  }
184
- header('Cache-Control: private, max-age=' . $hc_cache_max_age, false);
185
- //header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $hc_cache_max_age) . " GMT");
186
  } else {
187
- header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
188
- //header('Pragma: no-cache');
189
  }
190
 
191
  if ($hc_gzip) {
@@ -205,18 +198,20 @@ if (HC_READFILE) {
205
  die();
206
 
207
  function hyper_cache_sanitize_uri($uri) {
208
- $uri = preg_replace('/[^a-zA-Z0-9\/\-_]+/', '_', $uri);
209
- $uri = preg_replace('/\/+/', '/', $uri);
210
- //$uri = rtrim($uri, '.-_/');
211
  if (empty($uri) || $uri[0] != '/') {
212
  $uri = '/' . $uri;
213
  }
214
- if (strlen($uri) > 1 && substr($uri, -1, 1) == '/') {
215
- $uri = rtrim($uri, '/') . '_';
216
- }
217
  return $uri;
218
  }
219
 
 
 
 
 
 
220
  function hyper_cache_header($value) {
221
  header('X-Hyper-Cache: ' . $value, false);
222
  }
39
  return false;
40
  }
41
 
 
 
 
 
 
42
  if (!$hyper_cache_is_bot || $hyper_cache_is_bot && !HC_BOTS_IGNORE_NOCACHE) {
43
  if (isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') {
44
  hyper_cache_header('stop - no cache header');
71
  }
72
 
73
  if (HC_REJECT_AGENTS_ENABLED && isset($_SERVER['HTTP_USER_AGENT'])) {
74
+ if (preg_match('#(HC_REJECT_AGENTS)#i', $_SERVER['HTTP_USER_AGENT'])) {
75
  hyper_cache_header('stop - user agent');
76
  $cache_stop = true;
77
  return false;
98
  return false;
99
  }
100
  if (HC_REJECT_COOKIES_ENABLED) {
101
+ if (preg_match('#(HC_REJECT_COOKIES)#i', $n)) {
102
  hyper_cache_header('stop - bypass cookie');
103
  $cache_stop = true;
104
  return false;
120
 
121
  //$hc_file = ABSPATH . 'wp-content/cache/lite-cache' . $_SERVER['REQUEST_URI'] . '/index' . $hc_group . '.html';
122
  $hc_uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
123
+ $hc_host = hyper_cache_sanitize_host($_SERVER['HTTP_HOST']);
124
+ $hc_file = 'HC_FOLDER/' . $hc_host . $hc_uri . '/index' . $hyper_cache_group . '.html';
125
  if (HC_GZIP == 1 && $hyper_cache_gzip_accepted) {
126
  $hc_gzip = true;
127
  } else {
176
  $hc_cache_max_age = time() + (24 * 3600) - $hc_file_time;
177
  }
178
  }
179
+ header('Cache-Control: public, max-age=' . $hc_cache_max_age, false);
 
180
  } else {
181
+ header('Cache-Control: public, max-age=0, no-cache, no-transform', false);
 
182
  }
183
 
184
  if ($hc_gzip) {
198
  die();
199
 
200
  function hyper_cache_sanitize_uri($uri) {
201
+ $uri = preg_replace('|[^a-zA-Z0-9/\-_]+|', '_', $uri);
202
+ $uri = preg_replace('|/+|', '/', $uri);
203
+ $uri = rtrim($uri, '/');
204
  if (empty($uri) || $uri[0] != '/') {
205
  $uri = '/' . $uri;
206
  }
 
 
 
207
  return $uri;
208
  }
209
 
210
+ function hyper_cache_sanitize_host($host) {
211
+ $host = preg_replace('|[^a-zA-Z0-9\.]+|', '', $host);
212
+ return strtolower($host);
213
+ }
214
+
215
  function hyper_cache_header($value) {
216
  header('X-Hyper-Cache: ' . $value, false);
217
  }
languages/hyper-cache-ru_RU.mo CHANGED
Binary file
languages/hyper-cache-ru_RU.po CHANGED
@@ -1,501 +1,451 @@
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 3.0.2\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: 2014-09-07 14:35+0700\n"
11
  "Last-Translator: artnikov <artnikov@ya.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
  "Language: ru_RU\n"
17
- "X-Generator: Poedit 1.6.7\n"
18
 
19
- #: options.php:70
20
- msgid "Options saved. If you changes any of the bypasses empty the cache."
21
- msgstr ""
22
- "Настройки сохранены. Если вы изменяете страницы, то исключения изменяются в "
23
- "кеше"
24
 
25
- #: options.php:75
26
  #, php-format
27
- msgid ""
28
- "Unable to write the <code>wp-content/advanced-cache.php</code> file. Check "
29
- "the file or folder permissions."
30
- msgstr ""
31
- "Не удается создать файл <code>wp-content/advanced-cache.php</code> file. "
32
 
33
- #: options.php:83
34
  msgid "The cache folder has been cleaned."
35
  msgstr "Кэш папка была очищена."
36
 
37
- #: options.php:88
38
  msgid "Done!"
39
  msgstr "Отлично!"
40
 
41
- #: options.php:125
42
  msgid "Options deleted"
43
  msgstr "Настройки сброшены"
44
 
45
- #: options.php:130
46
  msgid "Cache size"
47
  msgstr "Размер КЭШа"
48
 
49
- #: options.php:141
50
  msgid "Old Hyper Cache options are missing or not readable."
51
  msgstr "Настройки ранней версии Hyper Cache отсутствуют или повреждены."
52
 
53
- #: options.php:164
54
  msgid "Old options imported, now review them and save."
55
  msgstr "Прежние настройки импортированы, их можно просмотреть и сохранить."
56
 
57
- #: options.php:213
58
  #, php-format
59
- msgid ""
60
- "You must add to the file wp-config.php (after the <code>define(\"WPLANG\", "
61
- "\"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
62
- msgstr ""
63
- "Вы должны добавить в файле wp-config.php (после строки <code>define(\"WPLANG"
64
- "\", \"\");</code>) код: <code>define(\"WP_CACHE\", true);</code>."
65
 
66
- #: options.php:222
67
  msgid "You must save the options since some files must be updated."
68
  msgstr "Вы должны сохранить настройки, так как файлы должны быть обновлены."
69
 
70
- #: options.php:229
71
  #, php-format
72
  msgid "Hyper Cache was not able to create or find the"
73
  msgstr "Hyper Cache не удалось создать или найти"
74
 
75
- #: options.php:231
76
  #, php-format
77
- msgid ""
78
- "folder, please create it manually with list, write and read permissions "
79
- "(usually 777)."
80
  msgstr "папку, пожалуйста создайте его вручную, с правами (обычно 777)."
81
 
82
- #: options.php:236
83
  #, php-format
84
- msgid ""
85
- "You should choose a different <a href=\"options-permalink.php\" target="
86
- "\"_blank\"> permalink structure under the Permalink panel</a> otherwise "
87
- "Hyper Cache cannot work properly."
88
- msgstr ""
89
- "Вы должны выбрать другую папку <a href=\"options-permalink.php\" target="
90
- "\"_blank\"> для постоянной ссылки</a> в противном случае Hyper Cache не "
91
- "может работать должным образом."
92
 
93
- #: options.php:249
94
  #, php-format
95
  msgid ""
96
- "Please, refer to the <a href=\"http://www.satollo.net/plugins/hyper-cache\" "
97
- "target=\"_blank\">official page</a> and the <a href=\"http://www.satollo.net/"
98
- "forums/forum/hyper-cache\" target=\"_blank\">official forum</a> for support. "
99
- "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-"
100
- "xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
101
- "\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png"
102
- "\"></a> Even <b>2$</b> helps! (<a href=\"http://www.satollo.net/donations\" "
103
- "target=\"_blank\">read more</a>)"
104
  msgstr ""
105
- "Пожалуйста, обратитесь к <a href=\"http://www.satollo.net/plugins/hyper-cache"
106
- "\" target=\"_blank\">официальная страница</a> и <a href=\"http://www.satollo."
107
- "net/forums/forum/hyper-cache\" target=\"_blank\">официальный форум</a> для "
108
- "поддержки.<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-"
109
- "xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
110
- "\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png"
111
- "\"></a> Даже <b>2$</b> поддержка! (<a href=\"http://www.satollo.net/donations"
112
- "\" target=\"_blank\">читать далее</a>)"
113
-
114
- #: options.php:252
115
  #, php-format
116
- msgid ""
117
- "Want a full mail marketing system in your blog? Try my free <a href=\"http://"
118
- "www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
119
- msgstr ""
120
- "Хотите полную маркетинговую почтовую систему на вашем сайте? Пробуйте мой "
121
- "бесплатный плагин <a href=\"http://www.satollo.net/plugins/newsletter\" "
122
- "target=\"_blank\">Newsletter</a>."
123
 
124
- #: options.php:255
125
  msgid "Clean the whole cache"
126
  msgstr "Удалить весь кеш"
127
 
128
- #: options.php:256
129
  msgid "Clean home and archives"
130
  msgstr "Очистка архивов и домашней"
131
 
132
- #: options.php:257
133
  msgid "Compute the cache size"
134
  msgstr "Вычесление размера КЕШа"
135
 
136
- #: options.php:258
137
  msgid "Import old options"
138
  msgstr "Импортировать настройки"
139
 
140
- #: options.php:259
141
  msgid "Sure? Your setting will be overwritten."
142
  msgstr "Уверены? Ваши настройки будут записаны поверх!"
143
 
144
- #: options.php:264
145
  msgid "General"
146
  msgstr "Главные"
147
 
148
- #: options.php:265
149
  msgid "Bypasses"
150
  msgstr "Исключения"
151
 
152
- #: options.php:266
153
  msgid "Mobile"
154
  msgstr "Мобильный"
155
 
156
- #: options.php:273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  msgid "Disable translations"
158
  msgstr "Отключить перевод"
159
 
160
- #: options.php:275
161
  msgid "Disable"
162
  msgstr "Отключить"
163
 
164
- #: options.php:277
165
- msgid ""
166
- "If you want to see this panel with the original labels, you can disable the "
167
- "tranlsation."
168
  msgstr "Если ВЫ хотите видеть настройки без перевода, можете его отключить."
169
 
170
- #: options.php:282
171
  msgid "Cached pages will be valid for"
172
  msgstr "Кэшированные страницы, будут действительны в течение"
173
 
174
- #: options.php:286
175
  msgid "0 means forever."
176
  msgstr "0 означает, что навсегда."
177
 
178
- #: options.php:290
179
  msgid "Enable compression"
180
  msgstr "Включить сжатие"
181
 
182
- #: options.php:295
183
- msgid ""
184
- "If you note odd characters when enabled, disable it since your server is "
185
- "already compressing the pages."
186
- msgstr ""
187
- "Если на сайте появились нечитаемые символы, то лучше отключить, так как на "
188
- "сервере существует сжатие .gzip"
189
 
190
- #: options.php:300
191
  msgid "When the home is refreshed, refresh even the"
192
  msgstr "Когда обновлена домашняя страница, обновятся остальные."
193
 
194
- #: options.php:303
195
  msgid "latest post"
196
  msgstr "последние записи"
197
 
198
- #: options.php:305
199
  msgid "The number of latest posts to invalidate when the home is invalidated."
200
  msgstr "Число последних записей, изменятся, когда изменена главная."
201
 
202
- #: options.php:310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  msgid "Cache folder"
204
- msgstr "Папки кэша"
205
 
206
- #: options.php:313
207
  msgid "path on disk"
208
  msgstr "путь к папке"
209
 
210
- #: options.php:315
211
  #, php-format
212
- msgid ""
213
- "Leave blank for default value. You can even evaluate to leave this blank and "
214
- "create a symbolic link"
215
- msgstr ""
216
- "Не включено по умолчанию. Вы можете проверить и создать символическую ссылку"
217
-
218
- #: options.php:317
219
- msgid "Your blog is located on"
220
- msgstr "блог находится на"
221
 
222
- #: options.php:319
223
  msgid "A wrong configuration can destroy your blog."
224
  msgstr "Неправильная конфигурация может уничтожить ваш сайт."
225
 
226
- #: options.php:324
227
  msgid "Next autoclean will run in"
228
- msgstr "Далее эта функция будет выполняться в"
 
 
 
 
229
 
230
- #: options.php:327
231
  msgid "minutes"
232
  msgstr "минуты"
233
 
234
- #: options.php:327
235
  msgid "The autoclean process removes old files to save disk space."
236
- msgstr ""
237
- "Автоочистка, удаляет устаревшие файлы, для оптимизации дискового "
238
- "пространства."
239
 
240
- #: options.php:334
 
 
 
 
241
  msgid "Allow browser caching"
242
  msgstr "Разрешение кеширования браузерами"
243
 
244
- #: options.php:336
245
  msgid "enable it"
246
- msgstr "Допустить"
247
 
248
- #: options.php:338
249
  msgid "with an expire time of"
250
  msgstr "по истечению"
251
 
252
- #: options.php:340 #: options.php:287
253
  msgid "hours"
254
  msgstr "часов"
255
 
256
- #: options.php:342
257
  msgid ""
258
- "When enabled Hyper Cache sends a signal to the browser allowing it to NOT "
259
- "request a page more than once andto use the copy it has in the local cache. "
260
- "If you set an expire time greater than zero, the browser should keep the "
261
- "copy for that amount of hours, otherwise Hyper Cache will tell the browser "
262
- "to keep the copy until the page expire in the blog cache.<br>Usually I keep "
263
- "this feature disabled."
264
  msgstr ""
265
- "Когда включен, Hyper Cache посылает сигнал браузеру, позволяющий НЕ просить, "
266
- "чтобы страница постоянно использовала копию, которая имеется в кэше. Если Вы "
267
- "устанавливаете время сохранения, больше чем ноль, браузер должен сохранить "
268
- "копию определенное время, иначе Hyper Cache скажет браузеру сохранять копию, "
269
- "пока не истечет время сохранения в кэше сайта.<br>Обычно я оставляю эту "
270
- "настройку заблокированной."
271
 
272
- #: options.php:348
273
- msgid "HTTPS separated cache"
274
- msgstr "Не кешировать HTTPS запросы"
 
 
 
 
275
 
276
- #: options.php:377
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  msgid "Do not cache the home page"
278
- msgstr "Не кэшировать главную страницу"
279
 
280
- #: options.php:381
281
- msgid ""
282
- "When active, the home page and its subpages are not cached. Works even with "
283
- "a static home page."
284
- msgstr ""
285
- "Когда активно, домашняя страница и его подстраницы не кэшируются. Работает "
286
- "даже со статической домашней страницей."
287
 
288
- #: options.php:386
289
  msgid "Do not cache the \"404 - Not found\" page"
290
  msgstr "Не кэшировать \"стр.404\" "
291
 
292
- #: options.php:391
293
- msgid ""
294
- "When active, Hyper Cache does not serve a cached 404 not found page. "
295
- "Requests which lead to a 404 not found page overload you blog since "
296
- "WordPress must generate a full page so caching it help in reduce that "
297
- "overload."
298
- msgstr ""
299
- "Когда активно, Hyper Cache не работает с кэшируемым 404, страницей. Запросы, "
300
- "которые приводят к 404 перегружают сайт, так как WordPress должен выдать "
301
- "полную страницу... , включение параметра помогает уменьшить нагрузку"
302
 
303
- #: options.php:395
304
  msgid "Do not cache the blog main feeds"
305
  msgstr "Не кешировать ленту комментариев"
306
 
307
- #: options.php:402
308
  msgid "When active, the main blog feed %s is not cached."
309
  msgstr "Когда активно, главная лента новостей RSS не кэшируется"
310
 
311
- #: options.php:405
312
  msgid "Do not cache single post comment feed"
313
  msgstr "Не кешировать ленту RSS комментариев"
314
 
315
- #: options.php:412
316
- msgid ""
317
- "When active, the single post comment feedis not cached. Usually I enable "
318
- "this reject since it saves disk space and comment feed on single posts are "
319
- "not usually used."
320
- msgstr ""
321
- "Когда активно, страница комментариев не кэшируется. Обычно включается, так "
322
- "как это сохраняет дисковое пространство."
323
 
324
- #: options.php:418
325
  msgid "Exact URIs to bypass"
326
- msgstr "Точный URI исключение"
327
 
328
- #: options.php:416 options.php:427 options.php:438 options.php:450
329
- #: options.php:420
330
  msgid "Enable"
331
  msgstr "Включить"
332
 
333
- #: options.php:422
 
 
 
 
334
  #, php-format
335
- msgid ""
336
- "Those URIs are exactly matched. For example if you add the <code>/my-single-"
337
- "post</code> URI and a request is received for <code>http://youblog."
338
- "com<strong>/my-single-post</strong></code> that page is not cached. A "
339
- "request for <code>http://youblog.com<strong>/my-single-post-something</"
340
- "strong></code> IS cached."
341
- msgstr ""
342
- "Тем URIs точно соответствуют. Например, если Вы добавляете <code>/my-single-"
343
- "post </code>, URI и запрос получены для <code>http://youblog.com<strong>/my-"
344
- "single-post</strong></code>, что страница не кэшируется. Запрос о "
345
- "<code>http://youblog.com<strong>/my-single-post-something</strong></code> "
346
- "кэшируется."
347
 
348
- #: options.php:431
349
  msgid "(Starting with) URIs to bypass"
350
- msgstr "(Начиная с) URI исключить"
351
 
352
- #: options.php:437
353
  #, php-format
354
- msgid ""
355
- "Those URIs match is a requested URI starts with one of them. For example if "
356
- "you add the <code>/my-single-post</code> URI and a request is received for "
357
- "<code>http://youblog.com<strong>/my-single-post</strong></code> that page IS "
358
- "cached. A request for <code>http://youblog.com<strong>/my-single-post-"
359
- "something</strong></code> IS cached as well."
360
- msgstr ""
361
- "То соответствие URIs - требуемые начала URI с одним из них. Например, если "
362
- "Вы добавляете<code>/my-single-post</code> URI кешируется так же <code>http://"
363
- "youblog.com<strong>/my-single-post</strong></code> та страница кэшируется. "
364
- "Запрос к <code>http://youblog.com<strong>/my-single-post-something</strong></"
365
- "code> Кэшируется также."
366
 
367
- #: options.php:445
368
  msgid "Cookies to bypass"
369
  msgstr "Куки исключить"
370
 
371
- #: options.php:452 options.php:441 options.php:530 options.php:430 #:
372
- #: options.php:419 options.php:516
373
- msgid "One per line"
374
- msgstr "По одному адресу в строке"
375
-
376
- #: options.php:451
377
- msgid ""
378
- "If the visitor has a cookie named as one of the listed values, the cache is "
379
- "bypassed."
380
- msgstr ""
381
- "Если указанная строка совпадает с одним из имен Cookies, кэш исключается."
382
 
383
- #: options.php:456
384
  msgid "Devices (user agents) to bypass"
385
  msgstr "Устройства(пользовательские) исключить"
386
 
387
- #: options.php:462
388
- msgid ""
389
- "If the visitor has a device with a user agent named as one of the listed "
390
- "values, the cache is bypassed."
391
- msgstr ""
392
- "Если посетитель имеет устройство с пользовательским агентом, названным как "
393
- "одно из перечисленных значений, кэширование не происходит."
394
 
395
- #: options.php:468
396
  msgid "Dont serve cached pages to comment authors"
397
  msgstr "Не кешировать авторские комментарии"
398
 
399
- #: options.php:472
400
- msgid ""
401
- "Hyper Cache is able to work with users who left a comment and completes the "
402
- "comment form with user data even on cached page (with a small JavaScript "
403
- "added at the end of the pages). But the \"awaiting moderation\" message "
404
- "cannot be shown. If you have few commentators, you can disable this feature "
405
- "to get back the classical WordPress comment flow."
406
  msgstr ""
407
- "Hyper Cache способен работать с пользователями, которые оставили комментарий "
408
- "и завершает комментарий форму с пользовательских данных даже на кэшированной "
409
- "страницы (с функцией JavaScript добавляется в конце страницы). Но сообщение "
410
- "\"ожидает модерации\" не может быть показано. Если у вас не много "
411
- "комментаторов, вы можете отключить эту функцию, чтобы вернуться классический "
412
- "комментариев поток WordPress ."
413
-
414
- #: options.php:466
415
- msgid "days"
416
- msgstr "дней"
417
 
418
- #: options.php:482
419
  msgid "Reject posts older than"
420
  msgstr "Не кешировать страницы старше"
421
 
422
- #: options.php:486
423
- msgid ""
424
- "Older posts wont be cached and stored resulting in a lower disk space usage. "
425
- "Useful when older posts have low traffic."
426
- msgstr ""
427
- "Архивные страницы, кэшируется и сохранены приводят к экономии дискового "
428
- "пространства. Полезно, когда старые страницы имеют низкий трафик."
429
 
430
- #: options.php:480 options.php:497
 
 
 
 
431
  msgid "Working mode"
432
  msgstr "Режим работы"
433
 
 
 
 
 
 
 
 
 
434
  #: options.php:484
435
  msgid "[disabled] Do not detect mobile devices"
436
  msgstr "[Отключено] Не обнаруживают мобильных устройств"
437
 
438
  #: options.php:500
439
  msgid "[enabled] Detect mobile devices and use a separate cache"
440
- msgstr ""
441
- "[Включено] Обнаружение мобильных устройства, используется отдельный кэш"
442
 
443
  #: options.php:501
444
  msgid "[enabled] Detect mobile devices and bypass the cache"
445
  msgstr "[Включено] Обнаружение мобильных устройств и кэша"
446
 
447
  #: options.php:504
448
- msgid ""
449
- "It make sense to disable the cache for mobile devices when their traffic is "
450
- "very low."
451
- msgstr ""
452
- "Имеет смысл отключить кэш для мобильных устройств, когда их трафик очень "
453
- "низок."
454
 
455
- #: options.php:509
456
  msgid "Mobile theme"
457
  msgstr "Мобильная тема"
458
 
459
- #: options.php:499
460
  msgid "Use the active blog theme"
461
  msgstr "Использование активной темы сайта"
462
 
463
- #: options.php:519
464
- msgid ""
465
- "If you have plugins which produce different content for desktop and mobile "
466
- "devices, you should use a separate cache for mobile."
467
- msgstr ""
468
- "Если Вы имеете дополнения к программе, которые производят различное "
469
- "содержание для стационарных и мобильных устройств, Вы должны использовать "
470
- "отдельный кэш для мобильных устройств."
471
 
472
- #: options.php:520
473
- msgid ""
474
- "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" "
475
- "target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile "
476
- "ads injection in posts."
477
- msgstr ""
478
- "Смотрите пример использования <a href=\"http://www.satollo.net/plugins/"
479
- "header-footer\" target=\"_blank\">Header и Footer</a> расширений для "
480
- "различных устройств."
481
 
482
- #: options.php:525
483
  msgid "Mobile user agents"
484
  msgstr "Мобильные агенты пользователей"
485
 
486
- #: options.php:528
487
  msgid "Reset"
488
  msgstr "Сброс"
489
 
490
  #: options.php:531
491
  #, php-format
492
- msgid ""
493
- "A \"user agent\" is a text which identify the kind of device used to surf "
494
- "the site. For example and iPhone has <code>iphone</code> as user agent."
495
- msgstr ""
496
- "A \"пользовательский агент \" является текстом, которые идентифицируют вид "
497
- "используемого устройства заниматься серфингом по сайтам. Например и iPhone "
498
- "имеет <code>iphone</code> как пользовательский агент."
499
 
500
  #: options.php:541
501
  msgid "Save"
1
  # SOME DESCRIPTIVE TITLE.
2
  # This file is put in the public domain.
3
+ # FIRST AUTHOR <artnikov@ya.ru>, 2015.
4
  #
5
  msgid ""
6
  msgstr ""
7
+ "Project-Id-Version: Hyper Cache 3.1.8\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: 2015-01-18 14:32+0600\n"
11
  "Last-Translator: artnikov <artnikov@ya.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
  "Language: ru_RU\n"
17
+ "X-Generator: Poedit 1.7.3\n"
18
 
19
+ #: options.php:77
20
+ msgid "Options saved. If you changed any of the bypasses empty the cache."
21
+ msgstr "Настройки сохранены. Если вы изменяете страницы, то изменяютя и страницы в кеше"
 
 
22
 
23
+ #: options.php:83
24
  #, php-format
25
+ msgid "Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions."
26
+ msgstr "Не удается создать файл <code>wp-content/advanced-cache.php</code> файл. Проверьте разрешение для создание папок и файлов."
 
 
 
27
 
28
+ #: options.php:90
29
  msgid "The cache folder has been cleaned."
30
  msgstr "Кэш папка была очищена."
31
 
32
+ #: options.php:95
33
  msgid "Done!"
34
  msgstr "Отлично!"
35
 
36
+ #: options.php:132
37
  msgid "Options deleted"
38
  msgstr "Настройки сброшены"
39
 
40
+ #: options.php:137
41
  msgid "Cache size"
42
  msgstr "Размер КЭШа"
43
 
44
+ #: options.php:148
45
  msgid "Old Hyper Cache options are missing or not readable."
46
  msgstr "Настройки ранней версии Hyper Cache отсутствуют или повреждены."
47
 
48
+ #: options.php:171
49
  msgid "Old options imported, now review them and save."
50
  msgstr "Прежние настройки импортированы, их можно просмотреть и сохранить."
51
 
52
+ #: options.php:220
53
  #, php-format
54
+ msgid "You must add to the file wp-config.php (after the <code>define(\"WPLANG\", \"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
55
+ msgstr "Вы должны добавить в файле wp-config.php (после строки <code>define(\"WPLANG\", \"\");</code>) код: <code>define(\"WP_CACHE\", true);</code>."
 
 
 
 
56
 
57
+ #: options.php:228
58
  msgid "You must save the options since some files must be updated."
59
  msgstr "Вы должны сохранить настройки, так как файлы должны быть обновлены."
60
 
61
+ #: options.php:237
62
  #, php-format
63
  msgid "Hyper Cache was not able to create or find the"
64
  msgstr "Hyper Cache не удалось создать или найти"
65
 
66
+ #: options.php:239
67
  #, php-format
68
+ msgid "folder, please create it manually with list, write and read permissions (usually 777)."
 
 
69
  msgstr "папку, пожалуйста создайте его вручную, с правами (обычно 777)."
70
 
71
+ #: options.php:249
72
  #, php-format
73
+ msgid "You should choose a different <a href=\"options-permalink.php\" target=\"_blank\"> permalink structure under the Permalink panel</a> otherwise Hyper Cache cannot work properly."
74
+ msgstr "Вы должны выбрать другую папку <a href=\"options-permalink.php\" target=\"_blank\"> для постоянной ссылки</a> в противном случае Hyper Cache не может работать должным образом."
 
 
 
 
 
 
75
 
76
+ #: options.php:263
77
  #, php-format
78
  msgid ""
79
+ "Please, refer to the <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">official page</a> and the <a href=\"http://www.satollo.net/forums/forum/hyper-cache\" target=\"_blank\">official forum</a> for support. <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img style="
80
+ "\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png\"></a> Even <b>2$</b> helps! (<a href=\"http://www.satollo.net/donations\" target=\"_blank\">read more</a>)"
 
 
 
 
 
 
81
  msgstr ""
82
+ "Пожалуйста, обратитесь для поддержки <a href=\"http://www.satollo.net/plugins/hyper-cache\" target=\"_blank\">официальная страница</a> и <a href=\"http://www.satollo.net/forums/forum/hyper-cache\" target=\"_blank\">официальный форум</a> .<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8\" target=\"_blank\"><img "
83
+ "style=\"vertical-align: bottom\" src=\"http://www.satollo.net/images/donate.png\"></a> Даже <b>2$</b> поддержка! (<a href=\"http://www.satollo.net/donations\" target=\"_blank\">читать далее</a>)"
84
+
85
+ #: options.php:266
 
 
 
 
 
 
86
  #, php-format
87
+ msgid "Want a full mail marketing system in your blog? Try my free <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
88
+ msgstr "Хотите полную маркетинговую почтовую систему на вашем сайте? Пробуйте мой бесплатный плагин <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a>."
 
 
 
 
 
89
 
90
+ #: options.php:269
91
  msgid "Clean the whole cache"
92
  msgstr "Удалить весь кеш"
93
 
94
+ #: options.php:270
95
  msgid "Clean home and archives"
96
  msgstr "Очистка архивов и домашней"
97
 
98
+ #: options.php:271
99
  msgid "Compute the cache size"
100
  msgstr "Вычесление размера КЕШа"
101
 
102
+ #: options.php:272
103
  msgid "Import old options"
104
  msgstr "Импортировать настройки"
105
 
106
+ #: options.php:273
107
  msgid "Sure? Your setting will be overwritten."
108
  msgstr "Уверены? Ваши настройки будут записаны поверх!"
109
 
110
+ #: options.php:278
111
  msgid "General"
112
  msgstr "Главные"
113
 
114
+ #: options.php:279
115
  msgid "Bypasses"
116
  msgstr "Исключения"
117
 
118
+ #: options.php:280
119
  msgid "Mobile"
120
  msgstr "Мобильный"
121
 
122
+ #: options.php:282
123
+ msgid "CDN"
124
+ msgstr "CDN"
125
+
126
+ #: options.php:288
127
+ msgid "EXPERIEMTAL! It works only with images, css, scripts."
128
+ msgstr "ВНИМАНИЕ! Это работает только с изображениями, стилями css, файлами скриптов."
129
+
130
+ #: options.php:301
131
+ #, php-format
132
+ msgid "Write here the CDN URL. For example a MaxCDN URL is something like<code>http://foo.bar.netdna-cdn.com</code>. You should usually create a pull zone in your CDN panel and they will give your an URL."
133
+ msgstr "Напишите здесь URL CDN. Например URL MaxCDN - например <code>http://foo.bar.netdna-cdn.com</code>. Вы должны обычно создать перемещающуюся зону в вашей панели CDN, и они дадут вашему URL."
134
+
135
+ #: options.php:309
136
+ #, php-format
137
+ msgid "I`m actually testing it with <a href=\"http://www.satollo.net/affiliate/maxcdn\" target=\"_blank\">MaxCDN</a> and <a href=\"http://www.satollo.net/affiliate/keycdn\" target=\"_blank\">KeyCDN</a>."
138
+ msgstr "Я фактически проверял это с <href = \"http://www.satollo.net/affiliate/maxcdn\" target = \"_blank\"> MaxCDN </a> и <href = \"http://www.satollo.net/affiliate/keycdn\" target = \"_blank\"> KeyCDN </a>."
139
+
140
+ #: options.php:319
141
  msgid "Disable translations"
142
  msgstr "Отключить перевод"
143
 
144
+ #: options.php:321 options.php:275
145
  msgid "Disable"
146
  msgstr "Отключить"
147
 
148
+ #: options.php:324
149
+ msgid "If you want to see this panel with the original labels, you can disable the tranlsation."
 
 
150
  msgstr "Если ВЫ хотите видеть настройки без перевода, можете его отключить."
151
 
152
+ #: options.php:330
153
  msgid "Cached pages will be valid for"
154
  msgstr "Кэшированные страницы, будут действительны в течение"
155
 
156
+ #: options.php:333
157
  msgid "0 means forever."
158
  msgstr "0 означает, что навсегда."
159
 
160
+ #: options.php:337
161
  msgid "Enable compression"
162
  msgstr "Включить сжатие"
163
 
164
+ #: options.php:342
165
+ msgid "If you note odd characters when enabled, disable it since your server is already compressing the pages."
166
+ msgstr "Если на сайте появились нечитаемые символы, отключаете сжатие, так как на вашем сервере - уже включено сжатие страниц."
 
 
 
 
167
 
168
+ #: options.php:348
169
  msgid "When the home is refreshed, refresh even the"
170
  msgstr "Когда обновлена домашняя страница, обновятся остальные."
171
 
172
+ #: options.php:350
173
  msgid "latest post"
174
  msgstr "последние записи"
175
 
176
+ #: options.php:352
177
  msgid "The number of latest posts to invalidate when the home is invalidated."
178
  msgstr "Число последних записей, изменятся, когда изменена главная."
179
 
180
+ #: options.php:357
181
+ msgid "When a post receives a comment"
182
+ msgstr "При написании комментария"
183
+
184
+ #: options.php:359 options.php:370
185
+ msgid "clean archives (categories, tags, ..., but not the home)"
186
+ msgstr "Очистить архивы(категории,теги..., но не главную)"
187
+
188
+ #: options.php:361 options.php:372
189
+ msgid "clean the home"
190
+ msgstr "Очистить домашнюю"
191
+
192
+ #: options.php:368
193
+ msgid "When a post is edited"
194
+ msgstr "Когда записи отредактированы"
195
+
196
+ #: options.php:380
197
  msgid "Cache folder"
198
+ msgstr "Папка кэша"
199
 
200
+ #: options.php:313 options.php:382
201
  msgid "path on disk"
202
  msgstr "путь к папке"
203
 
204
+ #: options.php:384
205
  #, php-format
206
+ msgid "Leave blank for default value. You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -&gt; [your folder]</code>. Your blog is located on"
207
+ msgstr "Оставьте не заполненым, для значения по-умолчанию. Вы можете проверить, оставить не заполненым и создать символическую ссылку, типа:<code>wp-content/cache/hyper-cache -&gt; [ВАША ПАПКА]</code>. Путь к вашему сайту:"
 
 
 
 
 
 
 
208
 
209
+ #: options.php:388
210
  msgid "A wrong configuration can destroy your blog."
211
  msgstr "Неправильная конфигурация может уничтожить ваш сайт."
212
 
213
+ #: options.php:393
214
  msgid "Next autoclean will run in"
215
+ msgstr "Далее эта функция будет выполняться через"
216
+
217
+ #: options.php:396
218
+ msgid "(will run again in)"
219
+ msgstr "выполнится снова через"
220
 
221
+ #: options.php:397
222
  msgid "minutes"
223
  msgstr "минуты"
224
 
225
+ #: options.php:399
226
  msgid "The autoclean process removes old files to save disk space."
227
+ msgstr "Автоочистка, удаляет устаревшие файлы, для оптимизации дискового пространства."
 
 
228
 
229
+ #: options.php:400
230
+ msgid "If you enable the \"serve expired pages to bots\", you should disable the auto clean."
231
+ msgstr "Если Вы допускаете \"выдачу страниц поисковым ботам с истиченным сроком существования\", Вы должны отключить автоочистку."
232
+
233
+ #: options.php:405
234
  msgid "Allow browser caching"
235
  msgstr "Разрешение кеширования браузерами"
236
 
237
+ #: options.php:407 options.php:395
238
  msgid "enable it"
239
+ msgstr "Разрешить, "
240
 
241
+ #: options.php:409
242
  msgid "with an expire time of"
243
  msgstr "по истечению"
244
 
245
+ #: options.php:410 #: options.php:287 options.php:332
246
  msgid "hours"
247
  msgstr "часов"
248
 
249
+ #: options.php:412
250
  msgid ""
251
+ "When enabled Hyper Cache sends a signal to the browser allowing it to NOT request a page more than once andto use the copy it has in the local cache. If you set an expire time greater than zero, the browser should keep the copy for that amount of hours, otherwise Hyper Cache will tell the browser to keep the copy until the page expire in the blog cache."
252
+ "<br>Usually I keep this feature disabled."
 
 
 
 
253
  msgstr ""
254
+ "Когда включен, Hyper Cache посылает сигнал браузеру, позволяющий НЕ спрашивать, чтобы страница постоянно использовала копию, которая имеется в кэше. Если Вы устанавливаете время сохранения, больше чем ноль, браузер должен сохранить копию определенное время, иначе Hyper Cache заставит браузер сохранять копию, пока не истечет время сохранения в кэше сайта."
255
+ "<br>Обычно я оставляю эту настройку заблокированной."
 
 
 
 
256
 
257
+ #: options.php:430
258
+ msgid "HTTPS"
259
+ msgstr "HTTPS"
260
+
261
+ #: options.php:432 options.php:590
262
+ msgid "Bypass the cache"
263
+ msgstr "Не кэшировать страницу"
264
 
265
+ #: options.php:433 options.php:589
266
+ msgid "Cache separately"
267
+ msgstr "Кешировать отдельно"
268
+
269
+ #: options.php:434
270
+ msgid "Use the standard cache (I have HTTP/HTTPS aware pages)"
271
+ msgstr "Используйте стандартный кэш (я имею HTTP/HTTP, страницы), "
272
+
273
+ #: options.php:441
274
+ msgid "Use readfile"
275
+ msgstr "Используйте чтение файлов"
276
+
277
+ #: options.php:445
278
+ msgid "The PHP function readfile to send back a page should optimized but on some server it has less performances the a standard file_get_contents. Probably you wont notice the difference."
279
+ msgstr "Функция PHP чтение файлов, чтобы послать назад страницу, она должна быть оптимизированной, но на некотором сервере функция file_get_contents, имеет меньшее значение. Вероятно Все правильно, если видите различие."
280
+
281
+ #: options.php:452
282
+ msgid "Ignore no-cache header from bots"
283
+ msgstr "Игнорируйте заголовок без кэша для ботов"
284
+
285
+ #: options.php:463
286
+ msgid "Serve expired pages to bots"
287
+ msgstr "Служит ботам со страницами с закончевшимся сроком действия"
288
+
289
+ #: options.php:463
290
+ msgid "Serve a cache page even if expired when requested by bots."
291
+ msgstr "Служит странице кэша, даже если истек когда требуется ботами."
292
+
293
+ #: options.php:478
294
  msgid "Do not cache the home page"
295
+ msgstr "Не кэшируйте домашнюю страницу"
296
 
297
+ #: options.php:482
298
+ msgid "When active, the home page and its subpages are not cached."
299
+ msgstr "Когда активно, домашняя страница и его подстраницы не кэшируются."
300
+
301
+ #: options.php:483
302
+ msgid "Works even with a static home page."
303
+ msgstr "Работы даже со статической домашней страницей."
304
 
305
+ #: options.php:488
306
  msgid "Do not cache the \"404 - Not found\" page"
307
  msgstr "Не кэшировать \"стр.404\" "
308
 
309
+ #: options.php:492
310
+ msgid "When active, Hyper Cache does not serve a cached \"404 not found\" page. Requests which lead to a 404 not found page overload you blog since WordPress must generate a full page. Caching it help in reduce that overload."
311
+ msgstr "Когда активно, Hyper Cache не работает с кэшируемым 404, страницей. Запросы, которые приводят к 404 перегружают сайт, так как WordPress должен выдать полную страницу... , включение параметра помогает уменьшить нагрузку"
 
 
 
 
 
 
 
312
 
313
+ #: options.php:497
314
  msgid "Do not cache the blog main feeds"
315
  msgstr "Не кешировать ленту комментариев"
316
 
317
+ #: options.php:501
318
  msgid "When active, the main blog feed %s is not cached."
319
  msgstr "Когда активно, главная лента новостей RSS не кэшируется"
320
 
321
+ #: options.php:507
322
  msgid "Do not cache single post comment feed"
323
  msgstr "Не кешировать ленту RSS комментариев"
324
 
325
+ #: options.php:510
326
+ msgid "When active, the single post comment feeds are not cached. Usually I enable this bypass since it saves disk space and comment feed on single posts are not usually used."
327
+ msgstr "Когда активно, страница комментариев не кэшируется. Обычно включается, так как это оптимизирует использование дискового пространства."
 
 
 
 
 
328
 
329
+ #: options.php:516
330
  msgid "Exact URIs to bypass"
331
+ msgstr "Точный адрес URI исключить"
332
 
333
+ #: options.php:293 options.php:420 options.php:443 options.php:454 options.php:465 options.php:518 options.php:529 options.php:540 options.php:551 options.php:563
 
334
  msgid "Enable"
335
  msgstr "Включить"
336
 
337
+ #: options.php:521 options.php:532 options.php:543 options.php:554
338
+ msgid "One per line."
339
+ msgstr "По одному в линию."
340
+
341
+ #: options.php:522
342
  #, php-format
343
+ msgid "Those URIs are exactly matched. For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached. A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS cached."
344
+ msgstr "Адрес URIs точно соответствуют. Например, если Вы добавляете <code>/my-single-post </code>, URI и запрос получены для <code>http://youblog.com<strong>/my-single-post</strong></code>, что страница не кэшируется. Запрос о <code>http://youblog.com<strong>/my-single-post-something</strong></code> кэшируется."
 
 
 
 
 
 
 
 
 
 
345
 
346
+ #: options.php:527
347
  msgid "(Starting with) URIs to bypass"
348
+ msgstr "(Начиная с) адреса URI исключить"
349
 
350
+ #: options.php:533
351
  #, php-format
352
+ msgid "Those URIs match if a requested URI starts with one of them. For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached. A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS NOT cached as well."
353
+ msgstr "То соответствие URIs - требуемые начала URI с одним из них. Например, если Вы добавляете<code>/my-single-post</code> URI кешируется так же <code>http://youblog.com<strong>/my-single-post</strong></code> та страница кэшируется. Запрос к <code>http://youblog.com<strong>/my-single-post-something</strong></code> Кэшируется также."
 
 
 
 
 
 
 
 
 
 
354
 
355
+ #: options.php:538
356
  msgid "Cookies to bypass"
357
  msgstr "Куки исключить"
358
 
359
+ #: options.php:544
360
+ msgid "If the visitor has a cookie named as one of the listed values, the cache is bypassed."
361
+ msgstr "Если указанная строка совпадает с одним из имен Cookies, кэш исключается."
 
 
 
 
 
 
 
 
362
 
363
+ #: options.php:549
364
  msgid "Devices (user agents) to bypass"
365
  msgstr "Устройства(пользовательские) исключить"
366
 
367
+ #: options.php:555
368
+ msgid "If the visitor has a device with a user agent named as one of the listed values, the cache is bypassed."
369
+ msgstr "Если посетитель имеет устройство с пользовательским агентом, названным как одно из перечисленных значений, кэширование не происходит."
 
 
 
 
370
 
371
+ #: options.php:561
372
  msgid "Dont serve cached pages to comment authors"
373
  msgstr "Не кешировать авторские комментарии"
374
 
375
+ #: options.php:566
376
+ msgid "Hyper Cache is able to work with users who left a comment and completes the comment form with user data even on cached page with a small JavaScript added at the end of the pages. But the \"awaiting moderation\" message cannot be shown. If you have few readers who comment you can disable this feature to get back the classical WordPress comment flow."
 
 
 
 
 
377
  msgstr ""
378
+ "Hyper Cache способен работать с пользователями, которые оставили комментарий и завершает комментарий форму с пользовательских данных даже на кэшированной страницы (с функцией JavaScript добавляется в конце страницы). Но сообщение \"ожидает модерации\" не может быть показано. Если у вас не много комментаторов, вы можете отключить эту функцию, чтобы "
379
+ "вернуться классический комментариев поток WordPress ."
 
 
 
 
 
 
 
 
380
 
381
+ #: options.php:571
382
  msgid "Reject posts older than"
383
  msgstr "Не кешировать страницы старше"
384
 
385
+ #: options.php:574
386
+ msgid "days"
387
+ msgstr "дней"
 
 
 
 
388
 
389
+ #: options.php:576
390
+ msgid "Older posts wont be cached and stored resulting in a lower disk space usage. Useful when older posts have low traffic."
391
+ msgstr "Архивные страницы, кэшируется и сохранены приводят к экономии дискового пространства. Полезно, когда старые страницы имеют низкий трафик."
392
+
393
+ #: options.php:480 options.php:497 options.php:586
394
  msgid "Working mode"
395
  msgstr "Режим работы"
396
 
397
+ #: options.php:588
398
+ msgid "Use the standard cache"
399
+ msgstr "Использовать стандартный КЕШ"
400
+
401
+ #: options.php:593
402
+ msgid "Choose \"cache separately\" if you produce different content for mobile devices"
403
+ msgstr "Выбирите кешировать отдельно, если используете мобильную тему"
404
+
405
  #: options.php:484
406
  msgid "[disabled] Do not detect mobile devices"
407
  msgstr "[Отключено] Не обнаруживают мобильных устройств"
408
 
409
  #: options.php:500
410
  msgid "[enabled] Detect mobile devices and use a separate cache"
411
+ msgstr "[Включено] Обнаружение мобильных устройства, используется отдельный кэш"
 
412
 
413
  #: options.php:501
414
  msgid "[enabled] Detect mobile devices and bypass the cache"
415
  msgstr "[Включено] Обнаружение мобильных устройств и кэша"
416
 
417
  #: options.php:504
418
+ msgid "It make sense to disable the cache for mobile devices when their traffic is very low."
419
+ msgstr "Имеет смысл отключить кэш для мобильных устройств, когда их трафик очень низок."
 
 
 
 
420
 
421
+ #: options.php:509 options.php:599
422
  msgid "Mobile theme"
423
  msgstr "Мобильная тема"
424
 
425
+ #: options.php:499 options.php:604
426
  msgid "Use the active blog theme"
427
  msgstr "Использование активной темы сайта"
428
 
429
+ #: options.php:519 options.php:610
430
+ msgid "If you have plugins which produce different content for desktop and mobile devices, you should use a separate cache for mobile."
431
+ msgstr "Если Вы имеете дополнения к программе, которые производят различное содержание для стационарных и мобильных устройств, Вы должны использовать отдельный кэш для мобильных устройств."
 
 
 
 
 
432
 
433
+ #: options.php:594
434
+ msgid "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile ads injection in posts."
435
+ msgstr "Смотрите пример использования <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header и Footer</a> расширений для различных устройств."
 
 
 
 
 
 
436
 
437
+ #: options.php:525 options.php:615
438
  msgid "Mobile user agents"
439
  msgstr "Мобильные агенты пользователей"
440
 
441
+ #: options.php:528 options.php:618
442
  msgid "Reset"
443
  msgstr "Сброс"
444
 
445
  #: options.php:531
446
  #, php-format
447
+ msgid "A \"user agent\" is a text which identify the kind of device used to surf the site. For example and iPhone has <code>iphone</code> as user agent."
448
+ msgstr "\"пользовательский агент \" текстовый формат устройства, которые идентифицируют вид используемого устройства, для занятий серфингом в интернете. Например и iPhone имеет <code>iphone</code> как пользовательский агент."
 
 
 
 
 
449
 
450
  #: options.php:541
451
  msgid "Save"
languages/hyper-cache.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
@@ -12,330 +12,559 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: options.php:70
16
- msgid "Options saved. If you changes any of the bypasses empty the cache."
 
17
  msgstr ""
18
 
19
- #: options.php:83
20
- msgid "The cache folder has been cleaned."
 
21
  msgstr ""
22
 
23
- #: options.php:130
24
- msgid "Cache size"
 
25
  msgstr ""
26
 
27
- #: options.php:222
28
- msgid "You must save the options since some files must be updated."
 
29
  msgstr ""
30
 
31
- #: options.php:231
32
- msgid "Hyper Cache was not able to create or find the %s folder."
 
33
  msgstr ""
34
 
35
- #: options.php:233
36
- msgid ""
37
- "Please create it manually with list, write and read permissions (usually "
38
- "777)."
39
  msgstr ""
40
 
41
- #: options.php:244
42
- msgid "You should choose a different permalink structure."
 
43
  msgstr ""
44
 
45
- #: options.php:245
46
- msgid ""
47
- "Change it on the <a href=\"options-permalink.php\" target=\"_blank"
48
- "\">permalink panel</a> otherwise Hyper Cache cannot work properly."
49
  msgstr ""
50
 
51
- #: options.php:270
52
- msgid "Clean the whole cache"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  msgstr ""
54
 
55
- #: options.php:271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  msgid "Clean home and archives"
57
  msgstr ""
58
 
59
- #: options.php:272
 
 
 
 
 
 
60
  msgid "Compute the cache size"
61
  msgstr ""
62
 
63
- #: options.php:273
64
- msgid "Import old options"
 
65
  msgstr ""
66
 
67
- #: options.php:278
68
- msgid "General"
 
69
  msgstr ""
70
 
71
- #: options.php:279
72
- msgid "Bypasses"
 
73
  msgstr ""
74
 
75
- #: options.php:280
76
- msgid "Mobile"
 
77
  msgstr ""
78
 
79
- #: options.php:298
80
- msgid "Cached pages will be valid for"
 
81
  msgstr ""
82
 
83
- #: options.php:301
84
- msgid "0 means forever."
 
85
  msgstr ""
86
 
87
- #: options.php:305
88
- msgid "Enable compression"
 
89
  msgstr ""
90
 
91
- #: options.php:310
92
- msgid ""
93
- "If you note odd characters when enabled, disable it since your server is "
94
- "already\r\n"
95
- " compressing the pages."
96
  msgstr ""
97
 
98
- #: options.php:320
99
- msgid "The number of latest posts to invalidate when the home is invalidated."
 
 
 
 
 
 
 
 
 
 
 
100
  msgstr ""
101
 
102
- #: options.php:326
103
- msgid "Cache folder"
 
104
  msgstr ""
105
 
106
- #: options.php:337
107
- msgid "Next autoclean will run in"
 
108
  msgstr ""
109
 
110
- #: options.php:341
111
- msgid "The autoclean process removes old files to save disk space."
 
112
  msgstr ""
113
 
114
- #: options.php:346
115
- msgid "Allow browser caching"
 
116
  msgstr ""
117
 
118
- #: options.php:362
119
- msgid "Remove HTTP/HTTPS"
 
 
 
 
 
 
120
  msgstr ""
121
 
122
- #: options.php:374
 
123
  msgid "HTTPS"
124
  msgstr ""
125
 
126
- #: options.php:376 options.php:515
127
- msgid "Bypass the cache"
 
 
128
  msgstr ""
129
 
130
- #: options.php:377 options.php:514
131
- msgid "Cache separately"
 
132
  msgstr ""
133
 
134
- #: options.php:378
135
- msgid "Use the standard cache (I have HTTP/HTTPS aware pages)"
 
136
  msgstr ""
137
 
138
- #: options.php:391
139
- msgid "Do not cache the home page"
 
140
  msgstr ""
141
 
142
- #: options.php:395
143
- msgid "When active, the home page and its subpages are not cached."
 
144
  msgstr ""
145
 
146
- #: options.php:396
147
- msgid "Works even with a static home page."
 
148
  msgstr ""
149
 
150
- #: options.php:401
151
- msgid "Do not cache the \"404 - Not found\" page"
 
152
  msgstr ""
153
 
154
- #: options.php:405
155
- msgid ""
156
- "When active, Hyper Cache does not serve a cached \"404 not found\" page."
157
  msgstr ""
158
 
159
- #: options.php:406
160
- msgid ""
161
- "Requests which lead to a 404 not found page overload you blog since "
162
- "WordPress must generate a full page"
163
  msgstr ""
164
 
165
- #: options.php:407
166
- msgid "Caching it help in reduce that overload."
 
167
  msgstr ""
168
 
169
- #: options.php:412
170
- msgid "Do not cache the blog main feeds"
 
171
  msgstr ""
172
 
173
- #: options.php:416
174
- msgid "When active, the main blog feed %s is not cached."
 
175
  msgstr ""
176
 
177
- #: options.php:422
178
- msgid "Do not cache single post comment feed"
 
179
  msgstr ""
180
 
181
- #: options.php:426
182
- msgid "When active, the single post comment feeds are not cached."
 
183
  msgstr ""
184
 
185
- #: options.php:427
186
- msgid ""
187
- "Usually I enable this bypass since it saves disk space and comment feed on "
188
- "single posts are not usually used."
189
  msgstr ""
190
 
191
- #: options.php:432
192
- msgid "Exact URIs to bypass"
 
193
  msgstr ""
194
 
195
- #: options.php:434 options.php:447 options.php:461 options.php:472
196
- #: options.php:484
197
- msgid "Enable"
198
  msgstr ""
199
 
200
- #: options.php:437 options.php:450 options.php:464 options.php:475
201
- #: options.php:545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  msgid "One per line."
203
  msgstr ""
204
 
205
- #: options.php:438
206
- msgid "Those URIs are exactly matched."
 
207
  msgstr ""
208
 
209
- #: options.php:439 options.php:452
210
- msgid ""
211
- "For example if you add the <code>/my-single-post</code> URI and a request is "
212
- "received for <code>http://youblog.com<strong>/my-single-post</strong></code> "
213
- "that page IS NOT cached."
214
  msgstr ""
215
 
216
- #: options.php:440
217
- msgid ""
218
- "A request for <code>http://youblog.com<strong>/my-single-post-something</"
219
- "strong></code> IS cached."
220
  msgstr ""
221
 
222
- #: options.php:445
223
- msgid "(Starting with) URIs to bypass"
 
224
  msgstr ""
225
 
226
- #: options.php:451
227
- msgid "Those URIs match if a requested URI starts with one of them."
 
228
  msgstr ""
229
 
230
- #: options.php:454
231
- msgid ""
232
- "A request for <code>http://youblog.com<strong>/my-single-post-something</"
233
- "strong></code> IS NOT cached as well."
234
  msgstr ""
235
 
236
- #: options.php:459
237
- msgid "Cookies to bypass"
 
238
  msgstr ""
239
 
240
- #: options.php:465
241
- msgid ""
242
- "If the visitor has a cookie named as one of the listed values, the cache is "
243
- "bypassed."
 
 
 
 
 
 
 
 
 
244
  msgstr ""
245
 
 
 
 
 
 
 
246
  #: options.php:470
247
- msgid "Devices (user agents) to bypass"
248
  msgstr ""
249
 
250
- #: options.php:476
251
- msgid ""
252
- "If the visitor has a device with a user agent named as one of the listed "
253
- "values, the cache is bypassed."
254
  msgstr ""
255
 
256
- #: options.php:482
257
- msgid "Don't serve cached pages to comment authors"
 
258
  msgstr ""
259
 
260
- #: options.php:487
261
- msgid ""
262
- "Hyper Cache is able to work with users who left a comment and completes the "
263
- "comment form with\r\n"
264
- " user data even on cached page"
265
  msgstr ""
266
 
267
- #: options.php:489
268
- msgid "(with a small JavaScript added at the end of the pages)."
 
269
  msgstr ""
270
 
271
- #: options.php:490
272
- msgid "But the \"awaiting moderation\" message cannot be shown."
 
273
  msgstr ""
274
 
275
- #: options.php:491
276
- msgid ""
277
- "If you have few readers who comment you can disable this feature to get back "
278
- "the classical WordPress comment flow."
279
  msgstr ""
280
 
281
- #: options.php:496
282
- msgid "Reject posts older than"
 
283
  msgstr ""
284
 
285
- #: options.php:500
286
- msgid ""
287
- "Older posts won't be cached and stored resulting in a lower disk space usage."
288
  msgstr ""
289
 
290
- #: options.php:501
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  msgid "Useful when older posts have low traffic."
292
  msgstr ""
293
 
294
- #: options.php:511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  msgid "Working mode"
296
  msgstr ""
297
 
298
- #: options.php:513
299
- msgid "Use the standard cache"
 
300
  msgstr ""
301
 
302
- #: options.php:518
303
- msgid ""
304
- "Choose \"cache separately\" if you produce different content for mobile "
305
- "devices"
306
  msgstr ""
307
 
308
- #: options.php:519
309
- msgid ""
310
- "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" "
311
- "target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile "
312
- "ads injection in posts."
313
  msgstr ""
314
 
315
- #: options.php:524
316
- msgid "Mobile theme"
 
317
  msgstr ""
318
 
319
- #: options.php:535
320
- msgid ""
321
- "If you have plugins which produce different content for desktop and mobile "
322
- "devices, you should use a separate cache for mobile."
323
  msgstr ""
324
 
325
- #: options.php:540
326
- msgid "Mobile user agents"
 
327
  msgstr ""
328
 
329
- #: options.php:546
330
- msgid ""
331
- "A \"user agent\" is a text which identify the kind of device used to surf "
332
- "the site."
333
  msgstr ""
334
 
335
- #: options.php:547
336
- msgid "For example and iPhone has <code>iphone</code> as user agent."
 
337
  msgstr ""
338
 
339
- #: options.php:557
340
- msgid "Save"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  msgstr ""
1
+ # Copyright (C) 2014
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #. Text in echo
16
+ #: options.php:539
17
+ msgid "(Starting with) URIs to bypass"
18
  msgstr ""
19
 
20
+ #. Text in echo
21
+ #: options.php:583
22
+ msgid "(with a small JavaScript added at the end of the pages)."
23
  msgstr ""
24
 
25
+ #. Text in echo
26
+ #: options.php:339
27
+ msgid "0 means forever."
28
  msgstr ""
29
 
30
+ #. Text in echo
31
+ #: options.php:641
32
+ msgid "A \"user agent\" is a text which identify the kind of device used to surf the site."
33
  msgstr ""
34
 
35
+ #. Text in echo
36
+ #: options.php:548
37
+ msgid "A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS NOT cached as well."
38
  msgstr ""
39
 
40
+ #. Text in echo
41
+ #: options.php:534
42
+ msgid "A request for <code>http://youblog.com<strong>/my-single-post-something</strong></code> IS cached."
 
43
  msgstr ""
44
 
45
+ #. Text in echo
46
+ #: options.php:394
47
+ msgid "A wrong configuration can destroy your blog."
48
  msgstr ""
49
 
50
+ #. Text in echo
51
+ #: options.php:411
52
+ msgid "Allow browser caching"
 
53
  msgstr ""
54
 
55
+ #. Text in echo
56
+ #: options.php:418
57
+ msgid "Attention: the browser may not reload a page from the blog showing not updated content. "
58
+ msgstr ""
59
+
60
+ #. Text in function
61
+ #: options.php:438
62
+ msgid "Build a separated cache"
63
+ msgstr ""
64
+
65
+ #. Text in echo
66
+ #: options.php:584
67
+ msgid "But the \"awaiting moderation\" message cannot be shown."
68
+ msgstr ""
69
+
70
+ #. Text in function
71
+ #: options.php:438
72
+ #: options.php:608
73
+ msgid "Bypass the cache"
74
+ msgstr ""
75
+
76
+ #. Text in echo
77
+ #: options.php:286
78
+ msgid "Bypasses"
79
  msgstr ""
80
 
81
+ #. Text in echo
82
+ #: options.php:288
83
+ msgid "CDN"
84
+ msgstr ""
85
+
86
+ #. Text in echo
87
+ #: options.php:388
88
+ msgid "Cache folder"
89
+ msgstr ""
90
+
91
+ #. Text in function
92
+ #: options.php:608
93
+ msgid "Cache separately"
94
+ msgstr ""
95
+
96
+ #. Text in function
97
+ #: options.php:663
98
+ msgid "Cache size"
99
+ msgstr ""
100
+
101
+ #. Text in echo
102
+ #: options.php:336
103
+ msgid "Cached pages will be valid for"
104
+ msgstr ""
105
+
106
+ #. Text in echo
107
+ #: options.php:501
108
+ msgid "Caching it help in reduce that overload."
109
+ msgstr ""
110
+
111
+ #. Text in echo
112
+ #: options.php:249
113
+ msgid "Change it on the <a href=\"options-permalink.php\" target=\"_blank\">permalink panel</a> otherwise Hyper Cache cannot work properly."
114
+ msgstr ""
115
+
116
+ #. Text in echo
117
+ #: options.php:613
118
+ msgid "Choose \"cache separately\" if you produce different content for mobile devices"
119
+ msgstr ""
120
+
121
+ #. Text in function
122
+ #: options.php:277
123
  msgid "Clean home and archives"
124
  msgstr ""
125
 
126
+ #. Text in function
127
+ #: options.php:276
128
+ msgid "Clean the whole cache"
129
+ msgstr ""
130
+
131
+ #. Text in function
132
+ #: options.php:278
133
  msgid "Compute the cache size"
134
  msgstr ""
135
 
136
+ #. Text in echo
137
+ #: options.php:553
138
+ msgid "Cookies to bypass"
139
  msgstr ""
140
 
141
+ #. Text in echo
142
+ #: options.php:564
143
+ msgid "Devices (user agents) to bypass"
144
  msgstr ""
145
 
146
+ #. Text in echo
147
+ #: options.php:516
148
+ msgid "Do not cache single post comment feed"
149
  msgstr ""
150
 
151
+ #. Text in echo
152
+ #: options.php:495
153
+ msgid "Do not cache the \"404 - Not found\" page"
154
  msgstr ""
155
 
156
+ #. Text in echo
157
+ #: options.php:506
158
+ msgid "Do not cache the blog main feeds"
159
  msgstr ""
160
 
161
+ #. Text in echo
162
+ #: options.php:485
163
+ msgid "Do not cache the home page"
164
  msgstr ""
165
 
166
+ #. Text in echo
167
+ #: options.php:576
168
+ msgid "Don\\'t serve cached pages to comment authors"
169
  msgstr ""
170
 
171
+ #. Text in function
172
+ #: options.php:663
173
+ msgid "Done!"
 
 
174
  msgstr ""
175
 
176
+ #. Text in function
177
+ #: options.php:297
178
+ #: options.php:413
179
+ #: options.php:426
180
+ #: options.php:450
181
+ #: options.php:461
182
+ #: options.php:472
183
+ #: options.php:528
184
+ #: options.php:541
185
+ #: options.php:555
186
+ #: options.php:566
187
+ #: options.php:578
188
+ msgid "Enable"
189
  msgstr ""
190
 
191
+ #. Text in echo
192
+ #: options.php:343
193
+ msgid "Enable compression"
194
  msgstr ""
195
 
196
+ #. Text in echo
197
+ #: options.php:526
198
+ msgid "Exact URIs to bypass"
199
  msgstr ""
200
 
201
+ #. Text in echo
202
+ #: options.php:306
203
+ msgid "For example a MaxCDN URL is something like"
204
  msgstr ""
205
 
206
+ #. Text in echo
207
+ #: options.php:642
208
+ msgid "For example and iPhone has <code>iphone</code> as user agent."
209
  msgstr ""
210
 
211
+ #. Text in echo
212
+ #: options.php:546
213
+ msgid "For example if you add the <code>/my-single-post</code> URI and a request is received for <code>http://youblog.com<strong>/my-single-post</strong></code> that page IS NOT cached."
214
+ msgstr ""
215
+
216
+ #. Text in echo
217
+ #: options.php:285
218
+ msgid "General"
219
  msgstr ""
220
 
221
+ #. Text in echo
222
+ #: options.php:436
223
  msgid "HTTPS"
224
  msgstr ""
225
 
226
+ #. Text in echo
227
+ #: options.php:581
228
+ msgid "Hyper Cache is able to work with users who left a comment and completes the comment form with
229
+ user data even on cached page"
230
  msgstr ""
231
 
232
+ #. Text in function
233
+ #: options.php:236
234
+ msgid "Hyper Cache was not able to create or find the %s folder."
235
  msgstr ""
236
 
237
+ #. Text in echo
238
+ #: options.php:559
239
+ msgid "If the visitor has a cookie named as one of the listed values, the cache is bypassed."
240
  msgstr ""
241
 
242
+ #. Text in echo
243
+ #: options.php:570
244
+ msgid "If the visitor has a device with a user agent named as one of the listed values, the cache is bypassed."
245
  msgstr ""
246
 
247
+ #. Text in echo
248
+ #: options.php:406
249
+ msgid "If you enable the \"serve expired pages to bots\", you should disable the auto clean."
250
  msgstr ""
251
 
252
+ #. Text in echo
253
+ #: options.php:585
254
+ msgid "If you have few readers who comment you can disable this feature to get back the classical WordPress comment flow."
255
  msgstr ""
256
 
257
+ #. Text in echo
258
+ #: options.php:630
259
+ msgid "If you have plugins which produce different content for desktop and mobile devices, you should use a separate cache for mobile."
260
  msgstr ""
261
 
262
+ #. Text in echo
263
+ #: options.php:348
264
+ msgid "If you note odd characters when enabled, disable it since your server is already compressing the pages."
265
  msgstr ""
266
 
267
+ #. Text in echo
268
+ #: options.php:459
269
+ msgid "Ignore no-cache header from bots"
 
270
  msgstr ""
271
 
272
+ #. Text in function
273
+ #: options.php:279
274
+ msgid "Import old options"
275
  msgstr ""
276
 
277
+ #. Text in echo
278
+ #: options.php:453
279
+ msgid "It should be better than the file_get_contents() actually used."
280
  msgstr ""
281
 
282
+ #. Text in echo
283
+ #: options.php:292
284
+ msgid "It works only with images, css, scripts."
285
  msgstr ""
286
 
287
+ #. Text in echo
288
+ #: options.php:392
289
+ msgid "Leave blank for default value."
290
  msgstr ""
291
 
292
+ #. Text in echo
293
+ #: options.php:417
294
+ msgid "Lets browser to use a local copy of the page if newer than specified."
295
  msgstr ""
296
 
297
+ #. Text in echo
298
+ #: options.php:287
299
+ msgid "Mobile"
 
300
  msgstr ""
301
 
302
+ #. Text in echo
303
+ #: options.php:619
304
+ msgid "Mobile theme"
305
  msgstr ""
306
 
307
+ #. Text in echo
308
+ #: options.php:635
309
+ msgid "Mobile user agents"
310
  msgstr ""
311
 
312
+ #. Text in echo
313
+ #: options.php:399
314
+ msgid "Next autoclean will run in"
315
+ msgstr ""
316
+
317
+ #. Text in function
318
+ #: options.php:663
319
+ msgid "Old Hyper Cache options are missing or not readable"
320
+ msgstr ""
321
+
322
+ #. Text in function
323
+ #: options.php:663
324
+ msgid "Old options imported, now review them and save."
325
+ msgstr ""
326
+
327
+ #. Text in echo
328
+ #: options.php:595
329
+ msgid "Older posts won\\'t be cached and stored resulting in a lower disk space usage."
330
+ msgstr ""
331
+
332
+ #. Text in echo
333
+ #: options.php:640
334
  msgid "One per line."
335
  msgstr ""
336
 
337
+ #. Text in function
338
+ #: options.php:663
339
+ msgid "Options deleted"
340
  msgstr ""
341
 
342
+ #. Text in function
343
+ #: options.php:663
344
+ msgid "Options saved. If you changed any of the bypasses empty the cache."
 
 
345
  msgstr ""
346
 
347
+ #. Text in echo
348
+ #: options.php:442
349
+ msgid "Pages are usually different when served in HTTP and HTTPS."
 
350
  msgstr ""
351
 
352
+ #. Text in echo
353
+ #: options.php:236
354
+ msgid "Please create it manually with list, write and read permissions (usually 777)."
355
  msgstr ""
356
 
357
+ #. Text in echo
358
+ #: options.php:590
359
+ msgid "Reject posts older than"
360
  msgstr ""
361
 
362
+ #. Text in echo
363
+ #: options.php:424
364
+ msgid "Remove HTTP/HTTPS"
 
365
  msgstr ""
366
 
367
+ #. Text in echo
368
+ #: options.php:500
369
+ msgid "Requests which lead to a 404 not found page overload you blog since WordPress must generate a full page"
370
  msgstr ""
371
 
372
+ #. Text in function
373
+ #: options.php:638
374
+ msgid "Reset"
375
+ msgstr ""
376
+
377
+ #. Text in function
378
+ #: options.php:652
379
+ msgid "Save"
380
+ msgstr ""
381
+
382
+ #. Text in echo
383
+ #: options.php:614
384
+ msgid "See for example my <a href=\"http://www.satollo.net/plugins/header-footer\" target=\"_blank\">Header and Footer</a> plugin for different desktop/mobile ads injection in posts."
385
  msgstr ""
386
 
387
+ #. Text in echo
388
+ #: options.php:474
389
+ msgid "Serve a cache page even if expired when requested by bots."
390
+ msgstr ""
391
+
392
+ #. Text in echo
393
  #: options.php:470
394
+ msgid "Serve expired pages to bots"
395
  msgstr ""
396
 
397
+ #. Text in function
398
+ #: options.php:279
399
+ msgid "Sure? Your setting will be overwritten."
 
400
  msgstr ""
401
 
402
+ #. Text in echo
403
+ #: options.php:405
404
+ msgid "The autoclean process removes old files to save disk space."
405
  msgstr ""
406
 
407
+ #. Text in function
408
+ #: options.php:663
409
+ msgid "The cache folder has been cleaned."
 
 
410
  msgstr ""
411
 
412
+ #. Text in echo
413
+ #: options.php:358
414
+ msgid "The number of latest posts to invalidate when the home is invalidated."
415
  msgstr ""
416
 
417
+ #. Text in echo
418
+ #: options.php:532
419
+ msgid "Those URIs are exactly matched."
420
  msgstr ""
421
 
422
+ #. Text in echo
423
+ #: options.php:545
424
+ msgid "Those URIs match if a requested URI starts with one of them."
 
425
  msgstr ""
426
 
427
+ #. Text in function
428
+ #: options.php:663
429
+ msgid "Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions."
430
  msgstr ""
431
 
432
+ #. Text in echo
433
+ #: options.php:448
434
+ msgid "Use readfile()"
435
  msgstr ""
436
 
437
+ #. Text in echo
438
+ #: options.php:452
439
+ msgid "Use the PHP function readfile() to send back a page."
440
+ msgstr ""
441
+
442
+ #. Text in function
443
+ #: options.php:621
444
+ msgid "Use the active blog theme"
445
+ msgstr ""
446
+
447
+ #. Text in function
448
+ #: options.php:608
449
+ msgid "Use the standard cache"
450
+ msgstr ""
451
+
452
+ #. Text in function
453
+ #: options.php:438
454
+ msgid "Use the standard cache (I have HTTP/HTTPS aware pages)"
455
+ msgstr ""
456
+
457
+ #. Text in echo
458
+ #: options.php:596
459
  msgid "Useful when older posts have low traffic."
460
  msgstr ""
461
 
462
+ #. Text in echo
463
+ #: options.php:521
464
+ msgid "Usually I enable this bypass since it saves disk space and comment feed on single posts are not usually used."
465
+ msgstr ""
466
+
467
+ #. Text in echo
468
+ #: options.php:273
469
+ msgid "Want a full mail marketing system in your blog? Try my free <a href=\"http://www.satollo.net/plugins/newsletter\" target=\"_blank\">Newsletter</a> plugin."
470
+ msgstr ""
471
+
472
+ #. Text in echo
473
+ #: options.php:364
474
+ msgid "When a post is edited"
475
+ msgstr ""
476
+
477
+ #. Text in echo
478
+ #: options.php:376
479
+ msgid "When a post receives a comment"
480
+ msgstr ""
481
+
482
+ #. Text in echo
483
+ #: options.php:499
484
+ msgid "When active, Hyper Cache does not serve a cached \"404 not found\" page."
485
+ msgstr ""
486
+
487
+ #. Text in echo
488
+ #: options.php:489
489
+ msgid "When active, the home page and its subpages are not cached."
490
+ msgstr ""
491
+
492
+ #. Text in function
493
+ #: options.php:510
494
+ msgid "When active, the main blog feed %s is not cached."
495
+ msgstr ""
496
+
497
+ #. Text in echo
498
+ #: options.php:520
499
+ msgid "When active, the single post comment feeds are not cached."
500
+ msgstr ""
501
+
502
+ #. Text in echo
503
+ #: options.php:354
504
+ msgid "When the home is refreshed, refresh even the"
505
+ msgstr ""
506
+
507
+ #. Text in echo
508
+ #: options.php:606
509
  msgid "Working mode"
510
  msgstr ""
511
 
512
+ #. Text in echo
513
+ #: options.php:490
514
+ msgid "Works even with a static home page."
515
  msgstr ""
516
 
517
+ #. Text in echo
518
+ #: options.php:305
519
+ msgid "Write here the CDN URL."
 
520
  msgstr ""
521
 
522
+ #. Text in echo
523
+ #: options.php:393
524
+ msgid "You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -&gt; [your folder]</code>."
 
 
525
  msgstr ""
526
 
527
+ #. Text in echo
528
+ #: options.php:220
529
+ msgid "You must add to the file wp-config.php (after the <code>define(\"WPLANG\", \"\");</code>) the line of code: <code>define(\"WP_CACHE\", true);</code>"
530
  msgstr ""
531
 
532
+ #. Text in echo
533
+ #: options.php:228
534
+ msgid "You must save the options since some files must be updated."
 
535
  msgstr ""
536
 
537
+ #. Text in echo
538
+ #: options.php:249
539
+ msgid "You should choose a different permalink structure."
540
  msgstr ""
541
 
542
+ #. Text in echo
543
+ #: options.php:308
544
+ msgid "You should usually create a pull zone in your CDN panel and they will give your an URL."
 
545
  msgstr ""
546
 
547
+ #. Text in echo
548
+ #: options.php:593
549
+ msgid "days"
550
  msgstr ""
551
 
552
+ #. Text in echo
553
+ #: options.php:338
554
+ msgid "hours"
555
+ msgstr ""
556
+
557
+ #. Text in echo
558
+ #: options.php:356
559
+ msgid "latest post"
560
+ msgstr ""
561
+
562
+ #. Text in echo
563
+ #: options.php:403
564
+ msgid "minutes"
565
+ msgstr ""
566
+
567
+ #. Text in echo
568
+ #: options.php:403
569
+ msgid "will run again in"
570
  msgstr ""
options.php CHANGED
@@ -80,19 +80,20 @@ if ($controls->is_action('save')) {
80
  $r = $plugin->build_advanced_cache();
81
 
82
  if ($r == false) {
83
- $controls->errors = 'Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions.';
84
  }
85
  }
86
 
87
  if ($controls->is_action('clean')) {
88
  $folder = $plugin->get_folder();
89
  $plugin->remove_dir($folder . '');
 
90
  $controls->messages = __('The cache folder has been cleaned.', 'hyper-cache');
91
  }
92
 
93
  if ($controls->is_action('autoclean')) {
94
  $plugin->hook_hyper_cache_clean();
95
- $controls->messages = 'Done!';
96
  }
97
 
98
  if ($controls->is_action('clean-home')) {
@@ -128,8 +129,8 @@ if ($controls->is_action('clean-home')) {
128
  }
129
 
130
  if ($controls->is_action('delete')) {
131
- delete_option('hyper-cahe');
132
- $controls->messages = 'Options deleted';
133
  }
134
 
135
  if ($controls->is_action('size')) {
@@ -145,7 +146,7 @@ if ($controls->is_action('import')) {
145
  $old_options = get_option('hyper');
146
 
147
  if (!is_array($old_options)) {
148
- $controls->errors = 'Old Hyper Cache options are missing or not readable';
149
  } else {
150
 
151
  $uris = $plugin->text_to_list($old_options['reject']);
@@ -168,7 +169,7 @@ if ($controls->is_action('import')) {
168
 
169
  update_option('hyper-cache', $controls->options);
170
 
171
- $controls->messages = 'Old options imported, now review them and save.';
172
  }
173
  }
174
 
@@ -217,8 +218,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
217
  <?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
218
  <div class="error">
219
  <p>
220
- You must add to the file wp-config.php (after the <code>define('WPLANG', '');</code>) the line of code:
221
- <code>define('WP_CACHE', true);</code>.
222
  </p>
223
  </div>
224
  <?php } ?>
@@ -255,6 +255,16 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
255
  </div>
256
  <?php } ?>
257
 
 
 
 
 
 
 
 
 
 
 
258
 
259
  <?php $controls->show(); ?>
260
 
@@ -270,14 +280,13 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
270
  <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/donate.png"></a>
271
  Even <b>2$</b> helps! (<a href="http://www.satollo.net/donations" target="_blank">read more</a>)
272
  </p>
273
- <p>
274
- Want a full mail marketing system in your blog? Try my free <a href="http://www.satollo.net/plugins/newsletter" target="_blank">Newsletter</a> plugin.
275
- </p>
276
  <p>
277
  <?php $controls->button('clean', __('Clean the whole cache', 'hyper-cache')); ?>
278
  <?php $controls->button('clean-home', __('Clean home and archives', 'hyper-cache')); ?>
279
  <?php $controls->button('size', __('Compute the cache size', 'hyper-cache')); ?>
280
- <?php $controls->button('import', __('Import old options', 'hyper-cache'), 'Sure? Your setting will be overwritten.'); ?>
 
281
  </p>
282
 
283
  <div id="tabs">
@@ -285,19 +294,16 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
285
  <li><a href="#tabs-general"><?php _e('General', 'hyper-cache'); ?></a></li>
286
  <li><a href="#tabs-rejects"><?php _e('Bypasses', 'hyper-cache'); ?></a></li>
287
  <li><a href="#tabs-mobile"><?php _e('Mobile', 'hyper-cache'); ?></a></li>
288
- <?php if (defined('HYPER_CACHE_BETA') && HYPER_CACHE_BETA) { ?>
289
  <li><a href="#tabs-cdn"><?php _e('CDN', 'hyper-cache'); ?></a></li>
290
- <?php } ?>
291
  </ul>
292
 
293
- <?php if (defined('HYPER_CACHE_BETA') && HYPER_CACHE_BETA) { ?>
294
  <div id="tabs-cdn">
295
- <p>EXPERIEMTAL! It works only with images, css, scripts.</p>
296
  <table class="form-table">
297
  <tr>
298
  <th>&nbsp;</th>
299
  <td>
300
- <?php $controls->checkbox('cdn_enabled', 'Enable'); ?>
301
  </td>
302
  </tr>
303
  <tr>
@@ -305,9 +311,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
305
  <td>
306
  <?php $controls->text('cdn_url', 50); ?>
307
  <p class="description">
308
- Write here the CDN URL. For example a MaxCDN URL is something like
309
- <code>http://foo.bar.netdna-cdn.com</code>. You should usually create a pull zone in your
310
- CDN panel and they will give your an URL.
 
311
  </p>
312
  </td>
313
  </tr>
@@ -317,26 +324,27 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
317
  <a href="http://www.satollo.net/affiliate/keycdn" target="_blank">KeyCDN</a>.
318
  </p>
319
  </div>
320
- <?php } ?>
321
 
322
  <div id="tabs-general">
323
 
324
  <table class="form-table">
 
325
  <tr>
326
  <th>Disable translations</th>
327
  <td>
328
  <?php $controls->checkbox('translation_disabled', 'Disable'); ?>
329
  <p class="description">
330
- <!-- Do not translate that -->
331
  If you want to see this panel with the original labels, you can disable the
332
  tranlsation.
333
  </p>
334
  </td>
335
  </tr>
 
336
  <tr>
337
  <th><?php _e('Cached pages will be valid for', 'hyper-cache'); ?></th>
338
  <td>
339
- <?php $controls->text('max_age'); ?> hours
340
  <p class="description"><?php _e('0 means forever.', 'hyper-cache'); ?></p>
341
  </td>
342
  </tr>
@@ -346,37 +354,50 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
346
  <?php $controls->checkbox('gzip'); ?>
347
 
348
  <p class="description">
349
- <?php _e('If you note odd characters when enabled, disable it since your server is already
350
- compressing the pages.', 'hyper-cache'); ?>
351
  </p>
352
  </td>
353
  </tr>
354
  <tr>
355
- <th>When the home is refreshed, refresh even the</th>
356
  <td>
357
- <?php $controls->text('clean_last_posts', 5); ?> latest post
 
 
 
 
 
 
 
 
 
 
 
358
  <p class="description">
359
  <?php _e('The number of latest posts to invalidate when the home is invalidated.', 'hyper-cache'); ?>
360
  </p>
361
  </td>
362
  </tr>
 
363
  <tr>
364
- <th>When a post receives a comment</th>
365
  <td>
366
- <?php $controls->checkbox('clean_archives_on_comment'); ?> clean archives (categories, tags, ..., but not the home)
367
  <br>
368
- <?php $controls->checkbox('clean_home_on_comment'); ?> clean the home
369
  <p class="description">
370
 
371
  </p>
372
  </td>
373
  </tr>
 
374
  <tr>
375
- <th>When a post is edited</th>
376
  <td>
377
- <?php $controls->checkbox('clean_archives_on_post_edit'); ?> clean archives (categories, tags, ..., but not the home)
378
  <br>
379
- <?php $controls->checkbox('clean_home_on_post_edit'); ?> clean the home
380
  <p class="description">
381
 
382
  </p>
@@ -388,9 +409,9 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
388
  <td>
389
  <?php $controls->text('folder', 70); ?> path on disk
390
  <p class="description">
391
- Leave blank for default value. You can even evaluate to leave
392
- this blank and create a symbolic link <code>wp-content/cache/hyper-cache -&gt; [your folder]</code>. Your blog is located on
393
- <code><?php echo ABSPATH; ?></code>. A wrong configuration can destroy your blog.
394
  </p>
395
  </td>
396
  </tr>
@@ -399,7 +420,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
399
  <td>
400
  <?php $controls->checkbox('autoclean', 'enable it'); ?>
401
 
402
- (will run again in <?php echo (int)((wp_next_scheduled('hyper_cache_clean')-time())/60) ?> minutes)
403
  <p class="description">
404
  <?php _e('The autoclean process removes old files to save disk space.', 'hyper-cache'); ?>
405
  <?php _e('If you enable the "serve expired pages to bots", you should disable the auto clean.', 'hyper-cache'); ?>
@@ -409,15 +430,12 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
409
  <tr valign="top">
410
  <th><?php _e('Allow browser caching', 'hyper-cache'); ?></th>
411
  <td>
412
- <?php $controls->checkbox('browser_cache', 'enable it'); ?>
413
 
414
  with an expire time of <?php $controls->text('browser_cache_hours', 5); ?> hours
415
  <p class="description">
416
- When enabled Hyper Cache sends a signal to the browser allowing it to NOT request a page more than once and
417
- to use the copy it has in the local cache. If you set an expire time greater than zero, the browser should keep the copy
418
- for that amount of hours, otherwise Hyper Cache will tell the browser to keep the copy until the page expire in the blog
419
- cache.<br>
420
- Usually I keep this feature disabled.
421
  </p>
422
  </td>
423
  </tr>
@@ -425,7 +443,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
425
  <tr>
426
  <th><?php _e('Remove HTTP/HTTPS', 'hyper-cache'); ?></th>
427
  <td>
428
- <?php $controls->checkbox('remove_protocol', 'Enable'); ?>
429
  <p class="description">
430
  If your site uses both HTTP and HTTPS it's better to have page links as
431
  <code>://www.domain.com/...</code> without the protocol.
@@ -438,9 +456,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
438
  <th><?php _e('HTTPS', 'hyper-cache'); ?></th>
439
  <td>
440
  <?php $controls->select('https', array(0 => __('Bypass the cache', 'hyper-cache'),
441
- 1 => __('Cache separately', 'hyper-cache'),
442
  2 => __('Use the standard cache (I have HTTP/HTTPS aware pages)', 'hyper-cache'))); ?>
443
  <p class="description">
 
444
  </p>
445
  </td>
446
  </tr>
@@ -448,11 +467,10 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
448
  <tr>
449
  <th><?php _e('Use readfile()', 'hyper-cache'); ?></th>
450
  <td>
451
- <?php $controls->checkbox('readfile', 'Enable'); ?>
452
  <p class="description">
453
- The PHP function readfile() to send back a page should optimized but on some server
454
- it has less performances the a standard file_get_contents(). Probably you won't notice the
455
- difference.
456
  </p>
457
  </td>
458
  </tr>
@@ -460,7 +478,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
460
  <tr>
461
  <th><?php _e('Ignore no-cache header from bots', 'hyper-cache'); ?></th>
462
  <td>
463
- <?php $controls->checkbox('bots_ignore_nocache', 'Enable'); ?>
464
  <p class="description">
465
  Bots usually send a no-cache request to ask always fresh pages. This option force the cache to
466
  ignore such request and serve a caches page if available.
@@ -471,9 +489,9 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
471
  <tr>
472
  <th><?php _e('Serve expired pages to bots', 'hyper-cache'); ?></th>
473
  <td>
474
- <?php $controls->checkbox('serve_expired_to_bots', 'Enable'); ?>
475
  <p class="description">
476
- Serve a cache page even if expired when requested by bots.
477
  </p>
478
  </td>
479
  </tr>
@@ -591,7 +609,8 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
591
  <tr>
592
  <th><?php _e('Reject posts older than', 'hyper-cache'); ?></th>
593
  <td>
594
- <?php $controls->text('reject_old_posts', 5); ?> days
 
595
  <p class="description">
596
  <?php _e('Older posts won\'t be cached and stored resulting in a lower disk space usage.', 'hyper-cache'); ?>
597
  <?php _e('Useful when older posts have low traffic.', 'hyper-cache'); ?>
@@ -622,7 +641,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
622
  <?php
623
  $themes = wp_get_themes();
624
  //var_dump($themes);
625
- $list = array('' => 'Use the active blog theme');
626
  foreach ($themes as $theme)
627
  $list[$theme->stylesheet] = $theme->name;
628
  ?>
@@ -636,7 +655,7 @@ if (!wp_next_scheduled('hyper_cache_clean')) {
636
  <th><?php _e('Mobile user agents', 'hyper-cache'); ?></th>
637
  <td>
638
  <?php $controls->textarea('mobile_agents'); ?>
639
- <?php $controls->button('reset_mobile_agents', 'Reset'); ?>
640
  <p class="description">
641
  <?php _e('One per line.', 'hyper-cache'); ?>
642
  <?php _e('A "user agent" is a text which identify the kind of device used to surf the site.', 'hyper-cache'); ?>
80
  $r = $plugin->build_advanced_cache();
81
 
82
  if ($r == false) {
83
+ $controls->errors = __('Unable to write the <code>wp-content/advanced-cache.php</code> file. Check the file or folder permissions.', 'hyper-cache');
84
  }
85
  }
86
 
87
  if ($controls->is_action('clean')) {
88
  $folder = $plugin->get_folder();
89
  $plugin->remove_dir($folder . '');
90
+ do_action('hyper_cache_flush_all');
91
  $controls->messages = __('The cache folder has been cleaned.', 'hyper-cache');
92
  }
93
 
94
  if ($controls->is_action('autoclean')) {
95
  $plugin->hook_hyper_cache_clean();
96
+ $controls->messages = __('Done!', 'hyper-cache');
97
  }
98
 
99
  if ($controls->is_action('clean-home')) {
129
  }
130
 
131
  if ($controls->is_action('delete')) {
132
+ delete_option('hyper-cache');
133
+ $controls->messages = __('Options deleted', 'hyper-cache');
134
  }
135
 
136
  if ($controls->is_action('size')) {
146
  $old_options = get_option('hyper');
147
 
148
  if (!is_array($old_options)) {
149
+ $controls->errors = __('Old Hyper Cache options are missing or not readable', 'hyper-cache');
150
  } else {
151
 
152
  $uris = $plugin->text_to_list($old_options['reject']);
169
 
170
  update_option('hyper-cache', $controls->options);
171
 
172
+ $controls->messages = __('Old options imported, now review them and save.', 'hyper-cache');
173
  }
174
  }
175
 
218
  <?php if (!defined('WP_CACHE') || !WP_CACHE) { ?>
219
  <div class="error">
220
  <p>
221
+ <?php _e('You must add to the file wp-config.php (after the <code>&lt;php</code> first line) the line of code: <code>define("WP_CACHE", true);</code>', 'hyper-cache'); ?>
 
222
  </p>
223
  </div>
224
  <?php } ?>
255
  </div>
256
  <?php } ?>
257
 
258
+ <p>
259
+ Check out my other useful plugins:<br>
260
+ <a href="http://www.satollo.net/plugins/comment-plus?utm_source=hyper-cache&utm_medium=banner&utm_campaign=comment-plus" target="_blank"><img src="http://www.satollo.net/images/plugins/comment-plus-icon.png"></a>
261
+ <a href="http://www.satollo.net/plugins/header-footer?utm_source=hyper-cache&utm_medium=banner&utm_campaign=header-footer" target="_blank"><img src="http://www.satollo.net/images/plugins/header-footer-icon.png"></a>
262
+ <a href="http://www.satollo.net/plugins/include-me?utm_source=hyper-cache&utm_medium=banner&utm_campaign=include-me" target="_blank"><img src="http://www.satollo.net/images/plugins/include-me-icon.png"></a>
263
+ <a href="http://www.thenewsletterplugin.com/?utm_source=hyper-cache&utm_medium=banner&utm_campaign=newsletter" target="_blank"><img src="http://www.satollo.net/images/plugins/newsletter-icon.png"></a>
264
+ <a href="http://www.satollo.net/plugins/mailer?utm_source=hyper-cache&utm_medium=banner&utm_campaign=mailer" target="_blank"><img src="http://www.satollo.net/images/plugins/mailer-icon.png"></a>
265
+ <a href="http://www.satollo.net/plugins/php-text-widget?utm_source=hyper-cache&utm_medium=banner&utm_campaign=php-text-widget" target="_blank"><img src="http://www.satollo.net/images/plugins/php-text-widget-icon.png"></a>
266
+ </p>
267
+
268
 
269
  <?php $controls->show(); ?>
270
 
280
  <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5PHGDGNHAYLJ8" target="_blank"><img style="vertical-align: bottom" src="http://www.satollo.net/images/donate.png"></a>
281
  Even <b>2$</b> helps! (<a href="http://www.satollo.net/donations" target="_blank">read more</a>)
282
  </p>
283
+
 
 
284
  <p>
285
  <?php $controls->button('clean', __('Clean the whole cache', 'hyper-cache')); ?>
286
  <?php $controls->button('clean-home', __('Clean home and archives', 'hyper-cache')); ?>
287
  <?php $controls->button('size', __('Compute the cache size', 'hyper-cache')); ?>
288
+ <?php $controls->button('import', __('Import old options', 'hyper-cache'),
289
+ __('Sure? Your setting will be overwritten.', 'hyper-cache')); ?>
290
  </p>
291
 
292
  <div id="tabs">
294
  <li><a href="#tabs-general"><?php _e('General', 'hyper-cache'); ?></a></li>
295
  <li><a href="#tabs-rejects"><?php _e('Bypasses', 'hyper-cache'); ?></a></li>
296
  <li><a href="#tabs-mobile"><?php _e('Mobile', 'hyper-cache'); ?></a></li>
 
297
  <li><a href="#tabs-cdn"><?php _e('CDN', 'hyper-cache'); ?></a></li>
 
298
  </ul>
299
 
 
300
  <div id="tabs-cdn">
301
+ <p><?php _e('It works only with images, css, scripts.', 'hyper-cache'); ?></p>
302
  <table class="form-table">
303
  <tr>
304
  <th>&nbsp;</th>
305
  <td>
306
+ <?php $controls->checkbox('cdn_enabled', __('Enable', 'hyper-cache')); ?>
307
  </td>
308
  </tr>
309
  <tr>
311
  <td>
312
  <?php $controls->text('cdn_url', 50); ?>
313
  <p class="description">
314
+ <?php _e('Write here the CDN URL.', 'hyper-cache'); ?>
315
+ <?php _e('For example a MaxCDN URL is something like', 'hyper-cache'); ?>
316
+ <code>http://foo.bar.netdna-cdn.com</code>.
317
+ <?php _e('You should usually create a pull zone in your CDN panel and they will give your an URL.', 'hyper-cache'); ?>
318
  </p>
319
  </td>
320
  </tr>
324
  <a href="http://www.satollo.net/affiliate/keycdn" target="_blank">KeyCDN</a>.
325
  </p>
326
  </div>
 
327
 
328
  <div id="tabs-general">
329
 
330
  <table class="form-table">
331
+ <!-- Do not translate that -->
332
  <tr>
333
  <th>Disable translations</th>
334
  <td>
335
  <?php $controls->checkbox('translation_disabled', 'Disable'); ?>
336
  <p class="description">
337
+
338
  If you want to see this panel with the original labels, you can disable the
339
  tranlsation.
340
  </p>
341
  </td>
342
  </tr>
343
+ <!-- /Do not translate that -->
344
  <tr>
345
  <th><?php _e('Cached pages will be valid for', 'hyper-cache'); ?></th>
346
  <td>
347
+ <?php $controls->text('max_age'); ?><?php _e('hours', 'hyper-cache'); ?>
348
  <p class="description"><?php _e('0 means forever.', 'hyper-cache'); ?></p>
349
  </td>
350
  </tr>
354
  <?php $controls->checkbox('gzip'); ?>
355
 
356
  <p class="description">
357
+ <?php _e('If you note odd characters when enabled, disable it since your server is already compressing the pages.', 'hyper-cache'); ?>
358
+ <?php _e('If your server has mod_pagespeed, leave the compression disabled otherwise the module cannot optimize the page.', 'hyper-cache'); ?>
359
  </p>
360
  </td>
361
  </tr>
362
  <tr>
363
+ <th><?php _e('Enable on-the-fly compression', 'hyper-cache'); ?></th>
364
  <td>
365
+ <?php $controls->checkbox('gzip_on_the_fly'); ?>
366
+
367
+ <p class="description">
368
+ <?php _e('Enable on the fly compression for non cached pages.', 'hyper-cache'); ?>
369
+ </p>
370
+ </td>
371
+ </tr>
372
+ <tr>
373
+
374
+ <th><?php _e('When the home is refreshed, refresh even the', 'hyper-cache'); ?></th>
375
+ <td>
376
+ <?php $controls->text('clean_last_posts', 5); ?> <?php _e('latest post', 'hyper-cache'); ?>
377
  <p class="description">
378
  <?php _e('The number of latest posts to invalidate when the home is invalidated.', 'hyper-cache'); ?>
379
  </p>
380
  </td>
381
  </tr>
382
+
383
  <tr>
384
+ <th><?php _e('When a post is edited', 'hyper-cache'); ?></th>
385
  <td>
386
+ <?php $controls->checkbox('clean_archives_on_post_edit'); ?> clean archives (categories, tags, ..., but not the home)
387
  <br>
388
+ <?php $controls->checkbox('clean_home_on_post_edit'); ?> clean the home
389
  <p class="description">
390
 
391
  </p>
392
  </td>
393
  </tr>
394
+
395
  <tr>
396
+ <th><?php _e('When a post receives a comment', 'hyper-cache'); ?></th>
397
  <td>
398
+ <?php $controls->checkbox('clean_archives_on_comment'); ?> clean archives (categories, tags, ..., but not the home)
399
  <br>
400
+ <?php $controls->checkbox('clean_home_on_comment'); ?> clean the home
401
  <p class="description">
402
 
403
  </p>
409
  <td>
410
  <?php $controls->text('folder', 70); ?> path on disk
411
  <p class="description">
412
+ <?php _e('Leave blank for default value.', 'hyper-cache'); ?>
413
+ <?php _e('You can even evaluate to leave this blank and create a symbolic link <code>wp-content/cache/hyper-cache -&gt; [your folder]</code>.', 'hyper-cache'); ?>
414
+ <?php _e('A wrong configuration can destroy your blog.', 'hyper-cache'); ?>
415
  </p>
416
  </td>
417
  </tr>
420
  <td>
421
  <?php $controls->checkbox('autoclean', 'enable it'); ?>
422
 
423
+ (<?php _e('will run again in', 'hyper-cache'); ?> <?php echo (int)((wp_next_scheduled('hyper_cache_clean')-time())/60) ?> <?php _e('minutes', 'hyper-cache'); ?>)
424
  <p class="description">
425
  <?php _e('The autoclean process removes old files to save disk space.', 'hyper-cache'); ?>
426
  <?php _e('If you enable the "serve expired pages to bots", you should disable the auto clean.', 'hyper-cache'); ?>
430
  <tr valign="top">
431
  <th><?php _e('Allow browser caching', 'hyper-cache'); ?></th>
432
  <td>
433
+ <?php $controls->checkbox('browser_cache', __('Enable', 'hyper-cache')); ?>
434
 
435
  with an expire time of <?php $controls->text('browser_cache_hours', 5); ?> hours
436
  <p class="description">
437
+ <?php _e('Lets browser to use a local copy of the page if newer than specified.', 'hyper-cache'); ?>
438
+ <?php _e('Attention: the browser may not reload a page from the blog showing not updated content. ', 'hyper-cache'); ?>
 
 
 
439
  </p>
440
  </td>
441
  </tr>
443
  <tr>
444
  <th><?php _e('Remove HTTP/HTTPS', 'hyper-cache'); ?></th>
445
  <td>
446
+ <?php $controls->checkbox('remove_protocol', __('Enable', 'hyper-cache')); ?>
447
  <p class="description">
448
  If your site uses both HTTP and HTTPS it's better to have page links as
449
  <code>://www.domain.com/...</code> without the protocol.
456
  <th><?php _e('HTTPS', 'hyper-cache'); ?></th>
457
  <td>
458
  <?php $controls->select('https', array(0 => __('Bypass the cache', 'hyper-cache'),
459
+ 1 => __('Build a separated cache', 'hyper-cache'),
460
  2 => __('Use the standard cache (I have HTTP/HTTPS aware pages)', 'hyper-cache'))); ?>
461
  <p class="description">
462
+ <?php _e('Pages are usually different when served in HTTP and HTTPS.', 'hyper-cache'); ?>
463
  </p>
464
  </td>
465
  </tr>
467
  <tr>
468
  <th><?php _e('Use readfile()', 'hyper-cache'); ?></th>
469
  <td>
470
+ <?php $controls->checkbox('readfile', __('Enable', 'hyper-cache')); ?>
471
  <p class="description">
472
+ <?php _e('Use the PHP function readfile() to send back a page.', 'hyper-cache'); ?>
473
+ <?php _e('It should be better than the file_get_contents() actually used.', 'hyper-cache'); ?>
 
474
  </p>
475
  </td>
476
  </tr>
478
  <tr>
479
  <th><?php _e('Ignore no-cache header from bots', 'hyper-cache'); ?></th>
480
  <td>
481
+ <?php $controls->checkbox('bots_ignore_nocache', __('Enable', 'hyper-cache')); ?>
482
  <p class="description">
483
  Bots usually send a no-cache request to ask always fresh pages. This option force the cache to
484
  ignore such request and serve a caches page if available.
489
  <tr>
490
  <th><?php _e('Serve expired pages to bots', 'hyper-cache'); ?></th>
491
  <td>
492
+ <?php $controls->checkbox('serve_expired_to_bots', __('Enable', 'hyper-cache')); ?>
493
  <p class="description">
494
+ <?php _e('Serve a cache page even if expired when requested by bots.', 'hyper-cache'); ?>
495
  </p>
496
  </td>
497
  </tr>
609
  <tr>
610
  <th><?php _e('Reject posts older than', 'hyper-cache'); ?></th>
611
  <td>
612
+ <?php $controls->text('reject_old_posts', 5); ?>
613
+ <?php _e('days', 'hyper-cache'); ?>
614
  <p class="description">
615
  <?php _e('Older posts won\'t be cached and stored resulting in a lower disk space usage.', 'hyper-cache'); ?>
616
  <?php _e('Useful when older posts have low traffic.', 'hyper-cache'); ?>
641
  <?php
642
  $themes = wp_get_themes();
643
  //var_dump($themes);
644
+ $list = array('' => __('Use the active blog theme', 'hyper-cache'));
645
  foreach ($themes as $theme)
646
  $list[$theme->stylesheet] = $theme->name;
647
  ?>
655
  <th><?php _e('Mobile user agents', 'hyper-cache'); ?></th>
656
  <td>
657
  <?php $controls->textarea('mobile_agents'); ?>
658
+ <?php $controls->button('reset_mobile_agents', __('Reset', 'hyper-cache' )); ?>
659
  <p class="description">
660
  <?php _e('One per line.', 'hyper-cache'); ?>
661
  <?php _e('A "user agent" is a text which identify the kind of device used to surf the site.', 'hyper-cache'); ?>
plugin.php CHANGED
@@ -1,753 +1,678 @@
1
- <?php
2
-
3
- /*
4
- Plugin Name: Hyper Cache
5
- Plugin URI: http://www.satollo.net/plugins/hyper-cache
6
- Description: A easy to configure and efficient cache to increase the speed of your blog.
7
- Version: 3.1.8
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
- Contributors: satollo
12
- */
13
-
14
- if (!defined('HYPER_CACHE_LOG')) {
15
- define('HYPER_CACHE_LOG', false);
16
- }
17
-
18
- if (isset($_GET['cache'])) {
19
- if ($_GET['cache'] === '0') {
20
- setcookie('cache_disable', 1, time() + 3600 * 24 * 365, '/');
21
- $x = strpos($_SERVER['REQUEST_URI'], '?');
22
- header('Location:' . substr($_SERVER['REQUEST_URI'], 0, $x));
23
- die();
24
- }
25
-
26
- if ($_GET['cache'] === '1') {
27
- setcookie('cache_disable', 1, time() - 3600, '/');
28
- $x = strpos($_SERVER['REQUEST_URI'], '?');
29
- header('Location:' . substr($_SERVER['REQUEST_URI'], 0, $x));
30
- die();
31
- }
32
- }
33
-
34
- new HyperCache();
35
-
36
- global $cache_stop;
37
-
38
- class HyperCache {
39
-
40
- var $post_id;
41
- var $options;
42
- var $ob_started = false;
43
- static $instance;
44
-
45
- const MOBILE_AGENTS = 'android|iphone|iemobile|up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|ipod|xoom|blackberry';
46
-
47
- function __construct() {
48
- self::$instance = $this;
49
- $this->options = get_option('hyper-cache', array());
50
-
51
- register_activation_hook('hyper-cache/plugin.php', array($this, 'hook_activate'));
52
- register_deactivation_hook('hyper-cache/plugin.php', array($this, 'hook_deactivate'));
53
-
54
- add_action('edit_post', array($this, 'hook_edit_post'), 1);
55
- add_action('save_post', array($this, 'hook_save_post'), 1);
56
- add_action('comment_post', array($this, 'hook_comment_post'), 1, 2);
57
- add_action('wp_update_comment_count', array($this, 'hook_wp_update_comment_count'), 1);
58
- add_action('bbp_new_reply', array($this, 'hook_bbp_new_reply'));
59
- add_action('bbp_new_topic', array($this, 'hook_bbp_new_topic'));
60
-
61
- add_action('hyper_cache_clean', array($this, 'hook_hyper_cache_clean'));
62
-
63
- if (!is_admin() && !isset($_COOKIE['cache_disable'])) {
64
-
65
- // The function must exists or the advanced-cache.php has been removed
66
- global $hyper_cache_is_mobile;
67
- if ($hyper_cache_is_mobile && !empty($this->options['theme'])) {
68
- add_filter('stylesheet', array($this, 'hook_get_stylesheet'));
69
- add_filter('template', array($this, 'hook_get_template'));
70
- }
71
- add_action('template_redirect', array($this, 'hook_template_redirect'), 0);
72
- }
73
-
74
- if (is_admin()) {
75
- add_action('admin_init', array($this, 'hook_admin_init'));
76
- add_action('admin_head', array($this, 'hook_admin_head'));
77
- add_action('admin_menu', array($this, 'hook_admin_menu'));
78
-
79
- if (!is_dir(WP_CONTENT_DIR . '/logs')) {
80
- wp_mkdir_p(WP_CONTENT_DIR . '/logs');
81
- }
82
- }
83
- }
84
-
85
- function log($object) {
86
- if (is_object($object) || is_array($object)) {
87
- $object = print_r($object, true);
88
- }
89
- //file_put_contents(WP_CONTENT_DIR . '/logs/hyper-cache.log', $object, FILE_APPEND);
90
- error_log($object);
91
- }
92
-
93
- function hook_activate() {
94
- if (!is_dir(WP_CONTENT_DIR . '/logs')) {
95
- wp_mkdir_p(WP_CONTENT_DIR . '/logs');
96
- }
97
-
98
- if (!isset($this->options['mobile'])) {
99
- $this->options['mobile'] = 0;
100
- }
101
- if (!isset($this->options['folder'])) {
102
- $this->options['folder'] = '';
103
- }
104
- if (!isset($this->options['max_age'])) {
105
- $this->options['max_age'] = 24;
106
- }
107
- if (!isset($this->options['clean_last_posts'])) {
108
- $this->options['clean_last_posts'] = 0;
109
- }
110
- if (!isset($this->options['mobile_agents'])) {
111
- $this->options['mobile_agents'] = explode('|', self::MOBILE_AGENTS);
112
- }
113
- if (!isset($this->options['reject_agents']))
114
- $this->options['reject_agents'] = array();
115
- if (!isset($this->options['reject_cookies']))
116
- $this->options['reject_cookies'] = array();
117
- if (!isset($this->options['reject_uris']))
118
- $this->options['reject_uris'] = array();
119
- if (!isset($this->options['reject_uris_exact']))
120
- $this->options['reject_uris_exact'] = array();
121
- if (!isset($this->options['clean_last_posts']))
122
- $this->options['clean_last_posts'] = 0;
123
-
124
- if (!isset($this->options['https']))
125
- $this->options['https'] = 1;
126
-
127
- if (!isset($this->options['theme']))
128
- $this->options['theme'] = '';
129
-
130
- if (!isset($this->options['browser_cache_hours']))
131
- $this->options['browser_cache_hours'] = 24;
132
-
133
- update_option('hyper-cache', $this->options);
134
-
135
- @wp_mkdir_p(WP_CONTENT_DIR . '/cache/hyper-cache');
136
-
137
- if (is_file(WP_CONTENT_DIR . '/advanced-cache.php')) {
138
- $this->build_advanced_cache();
139
- touch(WP_CONTENT_DIR . '/advanced-cache.php');
140
- }
141
-
142
- if (!wp_next_scheduled('hyper_cache_clean')) {
143
- wp_schedule_event(time() + 300, 'hourly', 'hyper_cache_clean');
144
- }
145
- }
146
-
147
- function hook_deactivate() {
148
- // Reset the file without deleting it to avoid to lost manually assigned permissions
149
- file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', '');
150
- wp_clear_scheduled_hook('hyper_cache_clean');
151
- }
152
-
153
- function hook_admin_init() {
154
- if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
155
- wp_enqueue_script('jquery-ui-tabs');
156
- }
157
- }
158
-
159
- function hook_admin_head() {
160
- if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
161
- echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('hyper-cache') . '/admin.css"/>';
162
- }
163
- }
164
-
165
- function hook_admin_menu() {
166
- add_options_page('Hyper Cache', 'Hyper Cache', 'manage_options', 'hyper-cache/options.php');
167
- }
168
-
169
- function build_advanced_cache() {
170
- $advanced_cache = file_get_contents(dirname(__FILE__) . '/advanced-cache.php');
171
- $advanced_cache = str_replace('HC_MOBILE_AGENTS', implode('|', array_map('preg_quote', $this->options['mobile_agents'])), $advanced_cache);
172
- $advanced_cache = str_replace('HC_MOBILE', $this->options['mobile'], $advanced_cache);
173
-
174
- $advanced_cache = str_replace('HC_REJECT_AGENTS_ENABLED', empty($this->options['reject_agents_enabled']) ? 0 : 1, $advanced_cache);
175
- $advanced_cache = str_replace('HC_REJECT_AGENTS', implode('|', array_map('preg_quote', $this->options['reject_agents'])), $advanced_cache);
176
-
177
- $advanced_cache = str_replace('HC_REJECT_COOKIES_ENABLED', empty($this->options['reject_cookies_enabled']) ? 0 : 1, $advanced_cache);
178
- $advanced_cache = str_replace('HC_REJECT_COOKIES', implode('|', array_map('preg_quote', $this->options['reject_cookies'])), $advanced_cache);
179
-
180
-
181
- $advanced_cache = str_replace('HC_GZIP', isset($this->options['gzip']) ? 1 : 0, $advanced_cache);
182
- $advanced_cache = str_replace('HC_FOLDER', $this->get_folder(), $advanced_cache);
183
- $advanced_cache = str_replace('HC_MAX_AGE', $this->options['max_age'], $advanced_cache);
184
- $advanced_cache = str_replace('HC_REJECT_COMMENT_AUTHORS', isset($this->options['reject_comment_authors']) ? 1 : 0, $advanced_cache);
185
-
186
- $advanced_cache = str_replace('HC_BROWSER_CACHE_HOURS', $this->options['browser_cache_hours'], $advanced_cache);
187
- $advanced_cache = str_replace('HC_BROWSER_CACHE', isset($this->options['browser_cache']) ? 1 : 0, $advanced_cache);
188
-
189
- $advanced_cache = str_replace('HC_HTTPS', (int) $this->options['https'], $advanced_cache);
190
- $advanced_cache = str_replace('HC_READFILE', isset($this->options['readfile']) ? 1 : 0, $advanced_cache);
191
-
192
- $advanced_cache = str_replace('HC_SERVE_EXPIRED_TO_BOT', isset($this->options['serve_expired_to_bots']) ? 1 : 0, $advanced_cache);
193
- $advanced_cache = str_replace('HC_BOTS_IGNORE_NOCACHE', isset($this->options['bots_ignore_nocache']) ? 1 : 0, $advanced_cache);
194
-
195
- return file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', $advanced_cache);
196
- }
197
-
198
- function hook_bbp_new_reply($reply_id) {
199
- $topic_id = bbp_get_reply_topic_id($reply_id);
200
- $topic_url = bbp_get_topic_permalink($topic_id);
201
- //$dir = $this->get_folder() . '' . substr($topic_url, strlen(get_option('home'))) . '/';
202
- $dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
203
- $this->remove_dir($dir);
204
-
205
- $forum_id = bbp_get_reply_forum_id($reply_id);
206
- $forum_url = bbp_get_forum_permalink($forum_id);
207
- //$dir = $this->get_folder() . '' . substr($forum_url, strlen(get_option('home'))) . '/';
208
- $dir = $this->get_folder() . '/' . substr($topic_url, strpos($forum_url, '://') + 3) . '/';
209
- $this->remove_dir($dir);
210
- }
211
-
212
- function hook_bbp_new_topic($topic_id) {
213
- $topic_url = bbp_get_topic_permalink($topic_id);
214
- //$dir = $this->get_folder() . '' . substr($topic_url, strlen(get_option('home'))) . '/';
215
- $dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
216
- $this->remove_dir($dir);
217
-
218
- $forum_id = bbp_get_topic_forum_id($topic_id);
219
- $forum_url = bbp_get_forum_permalink($forum_id);
220
- $dir = $this->get_folder() . '/' . substr($topic_url, strpos($forum_url, '://') + 3) . '/';
221
- //$dir = $this->get_folder() . '' . substr($forum_url, strlen(get_option('home'))) . '/';
222
- $this->remove_dir($dir);
223
- }
224
-
225
- function hook_comment_post($comment_id, $status) {
226
- if (HYPER_CACHE_LOG)
227
- $this->log('Hook: comment_post');
228
- if ($status === 1) {
229
- $comment = get_comment($comment_id);
230
- $this->clean_post($comment->comment_post_ID, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_archives_on_comment']));
231
- }
232
- }
233
-
234
- function hook_wp_update_comment_count($post_id) {
235
- if (HYPER_CACHE_LOG)
236
- $this->log('Hook: wp_update_comment_count');
237
- if ($this->post_id == $post_id) {
238
- return;
239
- }
240
- $this->clean_post($post_id, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_home_on_comment']));
241
- }
242
-
243
- function hook_save_post($post_id) {
244
- if (HYPER_CACHE_LOG)
245
- $this->log('Hook: save_post');
246
- }
247
-
248
- /**
249
- * edit_post is called even when a comment is added, but the comment hook prevent the execution of
250
- * edit_post like if the post has been modified.
251
- */
252
- function hook_edit_post($post_id) {
253
- if (HYPER_CACHE_LOG)
254
- $this->log('Hook: edit_post');
255
- $this->clean_post($post_id, isset($this->options['clean_archives_on_post_edit']), isset($this->options['clean_home_on_post_edit']));
256
- }
257
-
258
- function clean_post($post_id, $clean_archives = true, $clean_home = true) {
259
- if (HYPER_CACHE_LOG)
260
- $this->log('Cleaning post ' . $post_id);
261
- // When someone deletes the advaced-cache.php file
262
- if (!function_exists('hyper_cache_sanitize_uri')) {
263
- if (HYPER_CACHE_LOG)
264
- $this->log('hyper_cache_sanitize_uri does not exists');
265
- return;
266
- }
267
-
268
- if ($this->post_id == $post_id) {
269
- if (HYPER_CACHE_LOG)
270
- $this->log('Already cleaned in this session');
271
- return;
272
- }
273
-
274
- $status = get_post_status($post_id);
275
- if (HYPER_CACHE_LOG)
276
- $this->log('Status: ' . $status);
277
- if ($status != 'publish' && $status != 'trash') {
278
- if (HYPER_CACHE_LOG)
279
- $this->log('Post not published');
280
- //$this->log('Not a published post');
281
- return;
282
- }
283
-
284
- if ($status == 'trash') {
285
- $clean_archives = true;
286
- $clean_home = true;
287
- }
288
-
289
- $this->post_id = $post_id;
290
- $folder = trailingslashit($this->get_folder());
291
- $dir = $folder . $this->post_folder($post_id);
292
- $this->remove_dir($dir);
293
-
294
- if ($this->options['clean_last_posts'] != 0) {
295
- $posts = get_posts(array('numberposts' => $this->options['clean_last_posts']));
296
- foreach ($posts as &$post) {
297
- $dir = $folder . $this->post_folder($post_id);
298
- $this->remove_dir($dir);
299
- }
300
- }
301
-
302
-
303
- $dir = $folder . substr(get_option('home'), strpos(get_option('home'), '://') + 3);
304
-
305
- if ($clean_home) {
306
- if (HYPER_CACHE_LOG)
307
- $this->log('Cleaning the home');
308
-
309
- // The home
310
- if (HYPER_CACHE_LOG)
311
- $this->log('Cleaning the home index*');
312
- @unlink($dir . '/index.html');
313
- @unlink($dir . '/index.html.gz');
314
- @unlink($dir . '/index-https.html');
315
- @unlink($dir . '/index-https.html.gz');
316
- @unlink($dir . '/index-mobile.html');
317
- @unlink($dir . '/index-mobile.html.gz');
318
- @unlink($dir . '/index-https-mobile.html');
319
- @unlink($dir . '/index-https-mobile.html.gz');
320
-
321
- $this->remove_dir($dir . '/feed/');
322
- // Home subpages
323
- $this->remove_dir($dir . '/page/');
324
- }
325
-
326
- //@unlink($dir . '/robots.txt');
327
- if ($clean_archives) {
328
- if (HYPER_CACHE_LOG)
329
- $this->log('Cleaning archives');
330
-
331
- $base = get_option('category_base');
332
- if (empty($base)) {
333
- $base = 'category';
334
- }
335
- $this->remove_dir($dir . '/' . $base . '/');
336
-
337
- $permalink_structure = get_option('permalink_structure');
338
- //$this->log(substr($permalink_structure, 0, 11));
339
- if (substr($permalink_structure, 0, 11) == '/%category%') {
340
- $categories = get_categories();
341
- //$this->log(print_r($categories, true));
342
- foreach ($categories as &$category) {
343
- //$this->log('Removing: ' . $dir . '/' . $category->slug . '/');
344
- $this->remove_page($dir . '/' . $category->slug);
345
- }
346
- }
347
-
348
- $base = get_option('tag_base');
349
- if (empty($base)) {
350
- $base = 'tag';
351
- }
352
- $this->remove_dir($dir . '/' . $base . '/');
353
-
354
- $this->remove_dir($dir . '/type/');
355
-
356
- $this->remove_dir($dir . '/' . date('Y') . '/');
357
- }
358
- }
359
-
360
- /*
361
- * Runs only if $hyper_cache_is_mobile is true
362
- */
363
-
364
- function hook_get_stylesheet($stylesheet = '') {
365
- $theme = wp_get_theme($this->options['theme']);
366
- if (!$theme->exists()) {
367
- return $stylesheet;
368
- }
369
- return $theme->stylesheet;
370
- }
371
-
372
- /*
373
- * Runs only if $hyper_cache_is_mobile is true
374
- *
375
- * var WP_Theme $theme
376
- */
377
-
378
- function hook_get_template($template) {
379
- $theme = wp_get_theme($this->options['theme']);
380
- if (!$theme->exists()) {
381
- return $template;
382
- }
383
- return $theme->template;
384
- }
385
-
386
- function hook_template_redirect() {
387
- global $cache_stop, $hyper_cache_stop, $lite_cache_stop;
388
-
389
- if (HYPER_CACHE_LOG) {
390
- $this->log('hook_template_redirect');
391
- }
392
-
393
- if ($this->ob_started) {
394
- return;
395
- }
396
-
397
- $home_root = parse_url(get_option('home'), PHP_URL_PATH);
398
-
399
- if ($cache_stop || $hyper_cache_stop || $lite_cache_stop) {
400
-
401
- } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
402
- $cache_stop = true;
403
- } else if (!empty($_SERVER['QUERY_STRING'])) {
404
- $cache_stop = true;
405
- } else if (is_user_logged_in()) {
406
- $cache_stop = true;
407
- } else if (is_trackback()) {
408
- $cache_stop = true;
409
- }
410
-
411
- // Global feed and global comment feed
412
- else if (isset($this->options['reject_feeds']) && is_feed()) {
413
- $cache_stop = true;
414
- }
415
-
416
- // Single post/page feed
417
- else if (isset($this->options['reject_comment_feeds']) && is_comment_feed()) {
418
- $cache_stop = true;
419
- } else if (isset($this->options['reject_home']) && is_front_page()) {
420
- $cache_stop = true;
421
- } else if (is_robots()) {
422
- $cache_stop = true;
423
- }
424
-
425
- if (defined('SID') && SID != '') {
426
- $cache_stop = true;
427
- }
428
-
429
- // Compatibility with XML Sitemap 4.x
430
- else if (substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 8) == ($home_root . '/sitemap')) {
431
- $cache_stop = true;
432
- }
433
- // Never cache pages generated for administrator (to be patched to see if the user is an administrator)
434
- //if (get_current_user_id() == 1) return;
435
- else if (is_404()) {
436
- if (isset($this->options['reject_404'])) {
437
- $cache_stop = true;
438
- } else {
439
- $file = $this->get_folder() . '/' . substr(get_option('home'), strpos(get_option('home'), '://') + 3) . '/404.html';
440
-
441
- if (file_exists($file) && ($this->options['max_age'] == 0 || filemtime($file) > time() - $this->options['max_age'] * 3600)) {
442
- header('Content-Type: text/html;charset=UTF-8');
443
- // For some reason it seems more performant than readfile...
444
- header('X-Hyper-Cache: hit,404');
445
- echo file_get_contents($file);
446
- die();
447
- }
448
- }
449
- }
450
-
451
- if (!$cache_stop && substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 4) == ($home_root . '/wp-')) {
452
- $cache_stop = true;
453
- }
454
-
455
-
456
-
457
- // URLs to reject (exact)
458
- if (!$cache_stop && isset($this->options['reject_uris_exact_enabled'])) {
459
- if (is_array($this->options['reject_uris_exact'])) {
460
- foreach ($this->options['reject_uris_exact'] as &$uri) {
461
- if ($_SERVER['REQUEST_URI'] == $uri) {
462
- $cache_stop = true;
463
- break;
464
- }
465
- }
466
- }
467
- }
468
-
469
- // URLs to reject
470
- if (!$cache_stop && isset($this->options['reject_uris_enabled'])) {
471
- if (is_array($this->options['reject_uris'])) {
472
- foreach ($this->options['reject_uris'] as &$uri) {
473
- if (strpos($_SERVER['REQUEST_URI'], $uri) === 0) {
474
- $cache_stop = true;
475
- break;
476
- }
477
- }
478
- }
479
- }
480
-
481
- if (!$cache_stop && !empty($this->options['reject_old_posts']) && is_single()) {
482
- global $post;
483
- if (strtotime($post->post_date_gmt) < time() - 86400 * $this->options['reject_old_posts'])
484
- return;
485
- }
486
-
487
- // If is not require to bypass the comment authors, remove the cookies so the page is generated without
488
- // comment moderation noticies
489
- if (!isset($this->options['reject_comment_authors'])) {
490
- foreach ($_COOKIE as $n => $v) {
491
- if (substr($n, 0, 14) == 'comment_author') {
492
- unset($_COOKIE[$n]);
493
- }
494
- }
495
- }
496
-
497
- $this->ob_started = true;
498
- ob_start('hyper_cache_callback');
499
- }
500
-
501
- function post_folder($post_id) {
502
- $url = get_permalink($post_id);
503
- $parts = parse_url($url);
504
- return $parts['host'] . hyper_cache_sanitize_uri($parts['path']);
505
- }
506
-
507
- function remove_page($dir) {
508
- if (HYPER_CACHE_LOG)
509
- $this->log('Removing page: ' . $dir);
510
- $dir = untrailingslashit($dir);
511
- @unlink($dir . '/index.html');
512
- @unlink($dir . '/index.html.gz');
513
- @unlink($dir . '/index-https.html');
514
- @unlink($dir . '/index-https.html.gz');
515
- @unlink($dir . '/index-mobile.html');
516
- @unlink($dir . '/index-mobile.html.gz');
517
- @unlink($dir . '/index-https-mobile.html');
518
- @unlink($dir . '/index-https-mobile.html.gz');
519
-
520
- $this->remove_dir($dir . '/feed/');
521
- // Pagination
522
- $this->remove_dir($dir . '/page/');
523
- }
524
-
525
- function remove_dir($dir) {
526
- if (HYPER_CACHE_LOG) {
527
- $this->log('Removing dir: ' . $dir);
528
- }
529
- $dir = trailingslashit($dir);
530
- $files = glob($dir . '*', GLOB_MARK);
531
- if (!empty($files)) {
532
- foreach ($files as &$file) {
533
- if (substr($file, -1) == DIRECTORY_SEPARATOR)
534
- $this->remove_dir($file);
535
- else {
536
- @unlink($file);
537
- }
538
- }
539
- }
540
- @rmdir($dir);
541
- }
542
-
543
- function hook_hyper_cache_clean() {
544
- if (!isset($this->options['autoclean'])) {
545
- return;
546
- }
547
- if (HYPER_CACHE_LOG) {
548
- $this->log('Periodic cache cleaning start');
549
- }
550
- if ($this->options['max_age'] == 0) {
551
- return;
552
- }
553
- $this->remove_older_than(time() - $this->options['max_age'] * 3600);
554
- if (HYPER_CACHE_LOG) {
555
- $this->log('Periodic cache cleaning stop');
556
- }
557
- }
558
-
559
- function remove_older_than($time) {
560
- $this->_remove_older_than($time, $this->get_folder() . '/');
561
- }
562
-
563
- function _remove_older_than($time, $dir) {
564
- $files = glob($dir . '*', GLOB_MARK);
565
- if (!empty($files)) {
566
- foreach ($files as &$file) {
567
- if (substr($file, -1) == '/')
568
- $this->_remove_older_than($time, $file);
569
- else {
570
- //$this->log($file . ' ' . ($time-filemtime($file)));
571
- if (@filemtime($file) < $time) {
572
- //$this->log('Removing ' . $file);
573
- @unlink($file);
574
- }
575
- }
576
- }
577
- }
578
- }
579
-
580
- function get_folder() {
581
- if (empty($this->options['folder']))
582
- return WP_CONTENT_DIR . '/cache/hyper-cache';
583
- else
584
- return $this->options['folder'];
585
- }
586
-
587
- function text_to_list($text) {
588
- $list = array();
589
- $items = explode("\n", str_replace(array("\n", "\r"), "\n", $text));
590
- foreach ($items as &$item) {
591
- $item = trim($item);
592
- if ($item == '')
593
- continue;
594
- $list[] = $item;
595
- }
596
- return $list;
597
- }
598
-
599
- }
600
-
601
- /*
602
- function hyper_cache_remove_protocol($buffer) {
603
-
604
- $buffer = str_ireplace('"http://', '"//', $buffer);
605
- $buffer = str_ireplace('\'http://', '\'//', $buffer);
606
- return $buffer;
607
-
608
- $parts = parse_url(get_home_url());
609
- $buffer = str_ireplace('http://' . $parts['host'], '//' . $parts['host'], $buffer);
610
- $buffer = str_ireplace('https://' . $parts['host'], '//' . $parts['host'], $buffer);
611
- return $buffer;
612
-
613
- }
614
-
615
- */
616
-
617
- function hyper_cache_cdn_callback($matches) {
618
- //error_log($matches[1]);
619
- $parts = parse_url($matches[2]);
620
- //$return = $parts['scheme'] . '://' . $parts['host'] . $parts['path'];
621
- $return = HyperCache::$instance->options['cdn_url'] . $parts['path'];
622
-
623
- if (!empty($parts['query'])) {
624
- $return .= '?' . $parts['query'];
625
- }
626
- return $matches[1] . $return . $matches[3];
627
- }
628
-
629
- function hyper_cache_callback($buffer) {
630
- global $cache_stop, $lite_cache, $hyper_cache_stop, $hyper_cache_group, $hyper_cache_is_mobile, $hyper_cache_gzip_accepted;
631
-
632
- $buffer = trim($buffer);
633
-
634
- if (strlen($buffer) == 0) {
635
- return '';
636
- }
637
-
638
- $options = HyperCache::$instance->options;
639
-
640
- // Replace the CDN Url
641
- if (isset($options['cdn_enabled'])) {
642
- $parts = parse_url(get_option('home'));
643
- $base = quotemeta($parts['scheme'] . '://' . $parts['host']);
644
- $base = quotemeta('http://' . $parts['host']);
645
-
646
- $buffer = preg_replace_callback("#(<img.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
647
- $buffer = preg_replace_callback("#(<script.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
648
- $buffer = preg_replace_callback("#(<link.+href=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
649
- }
650
-
651
- $buffer = apply_filters('cache_buffer', $buffer);
652
-
653
- if ($cache_stop || $hyper_cache_stop) {
654
-
655
- if (isset($options['gzip']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
656
- //error_log('dsfsdfsdfsdfsdffafasfsafdsa');
657
- header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
658
- header('Vary: Accept-Encoding,User-Agent');
659
- header('Content-Encoding: gzip');
660
- header('X-Hyper-Cache: gzip on the fly', false);
661
- return gzencode($buffer, 9);
662
- }
663
- return $buffer;
664
- }
665
-
666
- $uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
667
-
668
- $lc_dir = HyperCache::$instance->get_folder() . '/' . strtolower($_SERVER['HTTP_HOST']) . $uri;
669
-
670
- if ($hyper_cache_is_mobile) {
671
- // Bypass (should no need since there is that control on advanced-cache.php)
672
- if ($options['mobile'] == 2) {
673
- if (isset($options['gzip']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
674
- header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
675
- header('Vary: Accept-Encoding,User-Agent');
676
- header('Content-Encoding: gzip');
677
- header('X-Hyper-Cache: mobile, gzip on the fly', false);
678
- return gzencode($buffer, 9);
679
- }
680
- return $buffer;
681
- }
682
- }
683
-
684
- if (is_404()) {
685
- $lc_file = HyperCache::$instance->get_folder() . '/' . strtolower($_SERVER['HTTP_HOST']) . '/404.html';
686
- } else {
687
- $lc_file = $lc_dir . '/index' . $hyper_cache_group . '.html';
688
-
689
- if (!is_dir($lc_dir)) {
690
- wp_mkdir_p($lc_dir);
691
- }
692
- }
693
-
694
- if (!isset($options['reject_comment_authors']) && is_singular() && !is_feed() && !is_user_logged_in()) {
695
- $script = '<script>';
696
- $script .= 'function lc_get_cookie(name) {';
697
- $script .= 'var c = document.cookie;';
698
- $script .= 'if (c.indexOf(name) != -1) {';
699
- $script .= 'var x = c.indexOf(name)+name.length+1;';
700
- $script .= 'var y = c.indexOf(";",x);';
701
- $script .= 'if (y < 0) y = c.length;';
702
- $script .= 'return decodeURIComponent(c.substring(x,y));';
703
- $script .= '} else return "";}';
704
- $script .= 'if ((d = document.getElementById("commentform")) != null) { e = d.elements;';
705
- $script .= 'var z = lc_get_cookie("comment_author_email_' . COOKIEHASH . '");';
706
- $script .= 'if (z != "") e["email"].value = z;';
707
- $script .= 'z = lc_get_cookie("comment_author_' . COOKIEHASH . '");';
708
- $script .= 'if (z != "") e["author"].value = z.replace(/\+/g, " ");';
709
- $script .= 'z = lc_get_cookie("comment_author_url_' . COOKIEHASH . '");';
710
- $script .= 'if (z != "") e["url"].value = z;';
711
- $script .= '}';
712
- $script .= '</script>';
713
- $x = strrpos($buffer, '</body>');
714
- if ($x) {
715
- $buffer = substr($buffer, 0, $x) . $script . '</body></html>';
716
- } else {
717
- $buffer .= $script;
718
- }
719
- }
720
-
721
- file_put_contents($lc_file, $buffer . '<!-- hyper cache ' . date('Y-m-d h:i:s') . ' -->');
722
-
723
- // Saves the gzipped version
724
- if (isset($options['gzip'])) {
725
- $gzf = gzopen($lc_file . '.gz', 'wb9');
726
- gzwrite($gzf, $buffer . '<!-- hyper cache gzip ' . date('Y-m-d h:i:s') . ' -->');
727
- gzclose($gzf);
728
- }
729
- return $buffer;
730
- }
731
-
732
- if (!function_exists('hyper_cache_sanitize_uri')) {
733
-
734
- function hyper_cache_sanitize_uri($uri) {
735
- if (HYPER_CACHE_LOG) {
736
- $this->log('URI: ' . $uri);
737
- }
738
- $uri = preg_replace('/[^a-zA-Z0-9\/\-_]+/', '_', $uri);
739
- $uri = preg_replace('/\/+/', '/', $uri);
740
- //$uri = rtrim($uri, '.-_/');
741
- if (empty($uri) || $uri[0] != '/') {
742
- $uri = '/' . $uri;
743
- }
744
- if (strlen($uri) > 1 && substr($uri, -1, 1) == '/') {
745
- $uri = rtrim($uri, '/') . '_';
746
- }
747
- if (HYPER_CACHE_LOG) {
748
- $this->log('Sanitized URI: ' . $uri);
749
- }
750
- return $uri;
751
- }
752
-
753
- }
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: Hyper Cache
5
+ Plugin URI: http://www.satollo.net/plugins/hyper-cache
6
+ Description: A easy to configure and efficient cache to increase the speed of your blog.
7
+ Version: 3.2.7
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
+ Contributors: satollo
12
+ */
13
+
14
+ global $cache_stop;
15
+
16
+ new HyperCache();
17
+
18
+ class HyperCache {
19
+
20
+ var $post_id;
21
+ var $options;
22
+ var $ob_started = false;
23
+ static $instance;
24
+
25
+ const MOBILE_AGENTS = 'android|iphone|iemobile|up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|ipod|xoom|blackberry';
26
+
27
+ function __construct() {
28
+ self::$instance = $this;
29
+ $this->options = get_option('hyper-cache', array());
30
+
31
+ register_activation_hook('hyper-cache/plugin.php', array($this, 'hook_activate'));
32
+ register_deactivation_hook('hyper-cache/plugin.php', array($this, 'hook_deactivate'));
33
+
34
+ add_action('edit_post', array($this, 'hook_edit_post'), 1);
35
+ add_action('save_post', array($this, 'hook_save_post'), 1);
36
+ add_action('comment_post', array($this, 'hook_comment_post'), 1, 2);
37
+ add_action('wp_update_comment_count', array($this, 'hook_wp_update_comment_count'), 1);
38
+ add_action('bbp_new_reply', array($this, 'hook_bbp_new_reply'));
39
+ add_action('bbp_new_topic', array($this, 'hook_bbp_new_topic'));
40
+
41
+ add_action('hyper_cache_clean', array($this, 'hook_hyper_cache_clean'));
42
+
43
+ add_action('autoptimize_action_cachepurged', array($this, 'hook_autoptimize_action_cachepurged'));
44
+
45
+ if (!is_admin()) {
46
+
47
+ // The function must exists or the advanced-cache.php has been removed
48
+ global $hyper_cache_is_mobile;
49
+ if ($hyper_cache_is_mobile && !empty($this->options['theme'])) {
50
+ add_filter('stylesheet', array($this, 'hook_get_stylesheet'));
51
+ add_filter('template', array($this, 'hook_get_template'));
52
+ }
53
+ add_action('template_redirect', array($this, 'hook_template_redirect'), 0);
54
+ } else {
55
+ add_action('admin_init', array($this, 'hook_admin_init'));
56
+ add_action('admin_head', array($this, 'hook_admin_head'));
57
+ add_action('admin_menu', array($this, 'hook_admin_menu'));
58
+ }
59
+ }
60
+
61
+ function hook_activate() {
62
+
63
+ if (!isset($this->options['mobile'])) {
64
+ $this->options['mobile'] = 0;
65
+ }
66
+ if (!isset($this->options['folder'])) {
67
+ $this->options['folder'] = '';
68
+ }
69
+ if (!isset($this->options['max_age'])) {
70
+ $this->options['max_age'] = 24;
71
+ }
72
+ if (!isset($this->options['clean_last_posts'])) {
73
+ $this->options['clean_last_posts'] = 0;
74
+ }
75
+ if (!isset($this->options['mobile_agents'])) {
76
+ $this->options['mobile_agents'] = explode('|', self::MOBILE_AGENTS);
77
+ }
78
+ if (!isset($this->options['reject_agents']))
79
+ $this->options['reject_agents'] = array();
80
+ if (!isset($this->options['reject_cookies']))
81
+ $this->options['reject_cookies'] = array();
82
+ if (!isset($this->options['reject_uris']))
83
+ $this->options['reject_uris'] = array();
84
+ if (!isset($this->options['reject_uris_exact']))
85
+ $this->options['reject_uris_exact'] = array();
86
+ if (!isset($this->options['clean_last_posts']))
87
+ $this->options['clean_last_posts'] = 0;
88
+
89
+ if (!isset($this->options['https']))
90
+ $this->options['https'] = 1;
91
+
92
+ if (!isset($this->options['theme']))
93
+ $this->options['theme'] = '';
94
+
95
+ if (!isset($this->options['browser_cache_hours']))
96
+ $this->options['browser_cache_hours'] = 24;
97
+
98
+ update_option('hyper-cache', $this->options);
99
+
100
+ @wp_mkdir_p(WP_CONTENT_DIR . '/cache/hyper-cache');
101
+
102
+ if (is_file(WP_CONTENT_DIR . '/advanced-cache.php')) {
103
+ $this->build_advanced_cache();
104
+ touch(WP_CONTENT_DIR . '/advanced-cache.php');
105
+ }
106
+
107
+ if (!wp_next_scheduled('hyper_cache_clean')) {
108
+ wp_schedule_event(time() + 300, 'hourly', 'hyper_cache_clean');
109
+ }
110
+ }
111
+
112
+ function hook_deactivate() {
113
+ // Reset the file without deleting it to avoid to lost manually assigned permissions
114
+ file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', '');
115
+ wp_clear_scheduled_hook('hyper_cache_clean');
116
+ }
117
+
118
+ function hook_admin_init() {
119
+ if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
120
+ wp_enqueue_script('jquery-ui-tabs');
121
+ }
122
+ }
123
+
124
+ function hook_admin_head() {
125
+ if (isset($_GET['page']) && strpos($_GET['page'], 'hyper-cache/') === 0) {
126
+ echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('hyper-cache') . '/admin.css"/>';
127
+ }
128
+ }
129
+
130
+ function hook_admin_menu() {
131
+ add_options_page('Hyper Cache', 'Hyper Cache', 'manage_options', 'hyper-cache/options.php');
132
+ }
133
+
134
+ function build_advanced_cache() {
135
+ $advanced_cache = file_get_contents(dirname(__FILE__) . '/advanced-cache.php');
136
+ $advanced_cache = str_replace('HC_MOBILE_AGENTS', implode('|', array_map('preg_quote', $this->options['mobile_agents'])), $advanced_cache);
137
+ $advanced_cache = str_replace('HC_MOBILE', $this->options['mobile'], $advanced_cache);
138
+
139
+ $advanced_cache = str_replace('HC_REJECT_AGENTS_ENABLED', empty($this->options['reject_agents_enabled']) ? 0 : 1, $advanced_cache);
140
+ $advanced_cache = str_replace('HC_REJECT_AGENTS', implode('|', array_map('preg_quote', $this->options['reject_agents'])), $advanced_cache);
141
+
142
+ $advanced_cache = str_replace('HC_REJECT_COOKIES_ENABLED', empty($this->options['reject_cookies_enabled']) ? 0 : 1, $advanced_cache);
143
+ $advanced_cache = str_replace('HC_REJECT_COOKIES', implode('|', array_map('preg_quote', $this->options['reject_cookies'])), $advanced_cache);
144
+
145
+
146
+ $advanced_cache = str_replace('HC_GZIP', isset($this->options['gzip']) ? 1 : 0, $advanced_cache);
147
+ $advanced_cache = str_replace('HC_FOLDER', $this->get_folder(), $advanced_cache);
148
+ $advanced_cache = str_replace('HC_MAX_AGE', $this->options['max_age'], $advanced_cache);
149
+ $advanced_cache = str_replace('HC_REJECT_COMMENT_AUTHORS', isset($this->options['reject_comment_authors']) ? 1 : 0, $advanced_cache);
150
+
151
+ $advanced_cache = str_replace('HC_BROWSER_CACHE_HOURS', $this->options['browser_cache_hours'], $advanced_cache);
152
+ $advanced_cache = str_replace('HC_BROWSER_CACHE', isset($this->options['browser_cache']) ? 1 : 0, $advanced_cache);
153
+
154
+ $advanced_cache = str_replace('HC_HTTPS', (int) $this->options['https'], $advanced_cache);
155
+ $advanced_cache = str_replace('HC_READFILE', isset($this->options['readfile']) ? 1 : 0, $advanced_cache);
156
+
157
+ $advanced_cache = str_replace('HC_SERVE_EXPIRED_TO_BOT', isset($this->options['serve_expired_to_bots']) ? 1 : 0, $advanced_cache);
158
+ $advanced_cache = str_replace('HC_BOTS_IGNORE_NOCACHE', isset($this->options['bots_ignore_nocache']) ? 1 : 0, $advanced_cache);
159
+
160
+ return file_put_contents(WP_CONTENT_DIR . '/advanced-cache.php', $advanced_cache);
161
+ }
162
+
163
+ function hook_bbp_new_reply($reply_id) {
164
+ $topic_id = bbp_get_reply_topic_id($reply_id);
165
+ $topic_url = bbp_get_topic_permalink($topic_id);
166
+ $dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
167
+ $this->remove_dir($dir);
168
+
169
+ $forum_id = bbp_get_reply_forum_id($reply_id);
170
+ $forum_url = bbp_get_forum_permalink($forum_id);
171
+ $dir = $this->get_folder() . '/' . substr($forum_url, strpos($forum_url, '://') + 3) . '/';
172
+ $this->remove_dir($dir);
173
+ }
174
+
175
+ function hook_bbp_new_topic($topic_id) {
176
+ $topic_url = bbp_get_topic_permalink($topic_id);
177
+ $dir = $this->get_folder() . '/' . substr($topic_url, strpos($topic_url, '://') + 3) . '/';
178
+ $this->remove_dir($dir);
179
+
180
+ $forum_id = bbp_get_topic_forum_id($topic_id);
181
+ $forum_url = bbp_get_forum_permalink($forum_id);
182
+ $dir = $this->get_folder() . '/' . substr($forum_url, strpos($forum_url, '://') + 3) . '/';
183
+ $this->remove_dir($dir);
184
+ }
185
+
186
+ function hook_autoptimize_action_cachepurged()
187
+ {
188
+ $this->clean();
189
+ }
190
+
191
+ function hook_comment_post($comment_id, $status) {
192
+ if ($status === 1) {
193
+ $comment = get_comment($comment_id);
194
+ $this->clean_post($comment->comment_post_ID, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_home_on_comment']));
195
+ }
196
+ }
197
+
198
+ function hook_wp_update_comment_count($post_id) {
199
+ if ($this->post_id == $post_id) {
200
+ return;
201
+ }
202
+ $this->clean_post($post_id, isset($this->options['clean_archives_on_comment']), isset($this->options['clean_home_on_comment']));
203
+ }
204
+
205
+ function hook_save_post($post_id) {
206
+ }
207
+
208
+ /**
209
+ * edit_post is called even when a comment is added, but the comment hook prevent the execution of
210
+ * edit_post like if the post has been modified.
211
+ */
212
+ function hook_edit_post($post_id) {
213
+ $this->clean_post($post_id, isset($this->options['clean_archives_on_post_edit']), isset($this->options['clean_home_on_post_edit']));
214
+ }
215
+
216
+ function clean()
217
+ {
218
+ $folder = $this->get_folder();
219
+ $this->remove_dir($folder);
220
+ }
221
+
222
+ function clean_post($post_id, $clean_archives = true, $clean_home = true) {
223
+
224
+ // When someone deletes the advaced-cache.php file
225
+ if (!function_exists('hyper_cache_sanitize_uri')) {
226
+ return;
227
+ }
228
+
229
+ if ($this->post_id == $post_id) {
230
+ return;
231
+ }
232
+
233
+ $status = get_post_status($post_id);
234
+ if ($status != 'publish' && $status != 'trash') {
235
+ return;
236
+ }
237
+
238
+ if ($status == 'trash') {
239
+ $clean_archives = true;
240
+ $clean_home = true;
241
+ }
242
+
243
+ $this->post_id = $post_id;
244
+ $folder = trailingslashit($this->get_folder());
245
+ $dir = $folder . $this->post_folder($post_id);
246
+ $this->remove_dir($dir);
247
+
248
+ do_action('hyper_cache_flush', $post_id, get_permalink($post_id));
249
+
250
+ if ($this->options['clean_last_posts'] != 0) {
251
+ $posts = get_posts(array('numberposts' => $this->options['clean_last_posts']));
252
+ foreach ($posts as &$post) {
253
+ $dir = $folder . $this->post_folder($post_id);
254
+ $this->remove_dir($dir);
255
+ }
256
+ }
257
+
258
+ $dir = $folder . substr(get_option('home'), strpos(get_option('home'), '://') + 3);
259
+
260
+ if ($clean_home) {
261
+
262
+ @unlink($dir . '/index.html');
263
+ @unlink($dir . '/index.html.gz');
264
+ @unlink($dir . '/index-https.html');
265
+ @unlink($dir . '/index-https.html.gz');
266
+ @unlink($dir . '/index-mobile.html');
267
+ @unlink($dir . '/index-mobile.html.gz');
268
+ @unlink($dir . '/index-https-mobile.html');
269
+ @unlink($dir . '/index-https-mobile.html.gz');
270
+
271
+ $this->remove_dir($dir . '/feed/');
272
+ // Home subpages
273
+ $this->remove_dir($dir . '/page/');
274
+ }
275
+
276
+ //@unlink($dir . '/robots.txt');
277
+ if ($clean_archives) {
278
+
279
+ $base = get_option('category_base');
280
+ if (empty($base)) {
281
+ $base = 'category';
282
+ }
283
+ $this->remove_dir($dir . '/' . $base . '/');
284
+
285
+ $permalink_structure = get_option('permalink_structure');
286
+ //$this->log(substr($permalink_structure, 0, 11));
287
+ if (substr($permalink_structure, 0, 11) == '/%category%') {
288
+ $categories = get_categories();
289
+ //$this->log(print_r($categories, true));
290
+ foreach ($categories as &$category) {
291
+ //$this->log('Removing: ' . $dir . '/' . $category->slug . '/');
292
+ $this->remove_page($dir . '/' . $category->slug);
293
+ }
294
+ }
295
+
296
+ $base = get_option('tag_base');
297
+ if (empty($base)) {
298
+ $base = 'tag';
299
+ }
300
+ $this->remove_dir($dir . '/' . $base . '/');
301
+
302
+ $this->remove_dir($dir . '/type/');
303
+
304
+ $this->remove_dir($dir . '/' . date('Y') . '/');
305
+ }
306
+ }
307
+
308
+ /*
309
+ * Runs only if $hyper_cache_is_mobile is true
310
+ */
311
+
312
+ function hook_get_stylesheet($stylesheet = '') {
313
+ $theme = wp_get_theme($this->options['theme']);
314
+ if (!$theme->exists()) {
315
+ return $stylesheet;
316
+ }
317
+ return $theme->stylesheet;
318
+ }
319
+
320
+ /*
321
+ * Runs only if $hyper_cache_is_mobile is true
322
+ *
323
+ * var WP_Theme $theme
324
+ */
325
+
326
+ function hook_get_template($template) {
327
+ $theme = wp_get_theme($this->options['theme']);
328
+ if (!$theme->exists()) {
329
+ return $template;
330
+ }
331
+ return $theme->template;
332
+ }
333
+
334
+ function hook_template_redirect() {
335
+ global $cache_stop, $hyper_cache_stop, $lite_cache_stop;
336
+
337
+ if ($this->ob_started) {
338
+ return;
339
+ }
340
+
341
+ $home_root = parse_url(get_option('home'), PHP_URL_PATH);
342
+
343
+ if ($cache_stop || $hyper_cache_stop || $lite_cache_stop) {
344
+
345
+ } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
346
+ $cache_stop = true;
347
+ } else if (!empty($_SERVER['QUERY_STRING'])) {
348
+ $cache_stop = true;
349
+ } else if (is_user_logged_in()) {
350
+ $cache_stop = true;
351
+ } else if (is_trackback()) {
352
+ $cache_stop = true;
353
+ }
354
+
355
+ // Global feed and global comment feed
356
+ else if (isset($this->options['reject_feeds']) && is_feed()) {
357
+ $cache_stop = true;
358
+ }
359
+
360
+ // Single post/page feed
361
+ else if (isset($this->options['reject_comment_feeds']) && is_comment_feed()) {
362
+ $cache_stop = true;
363
+ } else if (isset($this->options['reject_home']) && is_front_page()) {
364
+ $cache_stop = true;
365
+ } else if (is_robots()) {
366
+ $cache_stop = true;
367
+ }
368
+
369
+ if (defined('SID') && SID != '') {
370
+ $cache_stop = true;
371
+ }
372
+
373
+ // Compatibility with XML Sitemap 4.x
374
+ else if (substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 8) == ($home_root . '/sitemap')) {
375
+ $cache_stop = true;
376
+ }
377
+ // Never cache pages generated for administrator (to be patched to see if the user is an administrator)
378
+ //if (get_current_user_id() == 1) return;
379
+ else if (is_404()) {
380
+ if (isset($this->options['reject_404'])) {
381
+ $cache_stop = true;
382
+ } else {
383
+ $file = $this->get_folder() . '/' . substr(get_option('home'), strpos(get_option('home'), '://') + 3) . '/404.html';
384
+
385
+ if (file_exists($file) && ($this->options['max_age'] == 0 || filemtime($file) > time() - $this->options['max_age'] * 3600)) {
386
+ header('Content-Type: text/html;charset=UTF-8');
387
+ // For some reason it seems more performant than readfile...
388
+ header('X-Hyper-Cache: hit,404');
389
+ echo file_get_contents($file);
390
+ die();
391
+ }
392
+ }
393
+ }
394
+
395
+ if (!$cache_stop && substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 4) == ($home_root . '/wp-')) {
396
+ $cache_stop = true;
397
+ }
398
+
399
+
400
+
401
+ // URLs to reject (exact)
402
+ if (!$cache_stop && isset($this->options['reject_uris_exact_enabled'])) {
403
+ if (is_array($this->options['reject_uris_exact'])) {
404
+ foreach ($this->options['reject_uris_exact'] as &$uri) {
405
+ if ($_SERVER['REQUEST_URI'] == $uri) {
406
+ $cache_stop = true;
407
+ break;
408
+ }
409
+ }
410
+ }
411
+ }
412
+
413
+ // URLs to reject
414
+ if (!$cache_stop && isset($this->options['reject_uris_enabled'])) {
415
+ if (is_array($this->options['reject_uris'])) {
416
+ foreach ($this->options['reject_uris'] as &$uri) {
417
+ if (strpos($_SERVER['REQUEST_URI'], $uri) === 0) {
418
+ $cache_stop = true;
419
+ break;
420
+ }
421
+ }
422
+ }
423
+ }
424
+
425
+ if (!$cache_stop && !empty($this->options['reject_old_posts']) && is_single()) {
426
+ global $post;
427
+ if (strtotime($post->post_date_gmt) < time() - 86400 * $this->options['reject_old_posts'])
428
+ return;
429
+ }
430
+
431
+ // If is not require to bypass the comment authors, remove the cookies so the page is generated without
432
+ // comment moderation noticies
433
+ if (!isset($this->options['reject_comment_authors'])) {
434
+ foreach ($_COOKIE as $n => $v) {
435
+ if (substr($n, 0, 14) == 'comment_author') {
436
+ unset($_COOKIE[$n]);
437
+ }
438
+ }
439
+ }
440
+
441
+ $this->ob_started = true;
442
+ ob_start('hyper_cache_callback');
443
+ }
444
+
445
+ function post_folder($post_id) {
446
+ $url = get_permalink($post_id);
447
+ $parts = parse_url($url);
448
+ return $parts['host'] . hyper_cache_sanitize_uri($parts['path']);
449
+ }
450
+
451
+ function remove_page($dir) {
452
+ $dir = untrailingslashit($dir);
453
+ @unlink($dir . '/index.html');
454
+ @unlink($dir . '/index.html.gz');
455
+ @unlink($dir . '/index-https.html');
456
+ @unlink($dir . '/index-https.html.gz');
457
+ @unlink($dir . '/index-mobile.html');
458
+ @unlink($dir . '/index-mobile.html.gz');
459
+ @unlink($dir . '/index-https-mobile.html');
460
+ @unlink($dir . '/index-https-mobile.html.gz');
461
+
462
+ $this->remove_dir($dir . '/feed/');
463
+ // Pagination
464
+ $this->remove_dir($dir . '/page/');
465
+ }
466
+
467
+ function remove_dir($dir) {
468
+ $dir = trailingslashit($dir);
469
+ $files = glob($dir . '*', GLOB_MARK);
470
+ if (!empty($files)) {
471
+ foreach ($files as &$file) {
472
+ if (substr($file, -1) == DIRECTORY_SEPARATOR)
473
+ $this->remove_dir($file);
474
+ else {
475
+ @unlink($file);
476
+ }
477
+ }
478
+ }
479
+ @rmdir($dir);
480
+ }
481
+
482
+ function hook_hyper_cache_clean() {
483
+ if (!isset($this->options['autoclean'])) {
484
+ return;
485
+ }
486
+ if ($this->options['max_age'] == 0) {
487
+ return;
488
+ }
489
+ $this->remove_older_than(time() - $this->options['max_age'] * 3600);
490
+ }
491
+
492
+ function remove_older_than($time) {
493
+ $this->_remove_older_than($time, $this->get_folder() . '/');
494
+ }
495
+
496
+ function _remove_older_than($time, $dir) {
497
+ $files = glob($dir . '*', GLOB_MARK);
498
+ if (!empty($files)) {
499
+ foreach ($files as &$file) {
500
+ if (substr($file, -1) == '/')
501
+ $this->_remove_older_than($time, $file);
502
+ else {
503
+ //$this->log($file . ' ' . ($time-filemtime($file)));
504
+ if (@filemtime($file) < $time) {
505
+ //$this->log('Removing ' . $file);
506
+ @unlink($file);
507
+ }
508
+ }
509
+ }
510
+ }
511
+ }
512
+
513
+ function get_folder() {
514
+ if (empty($this->options['folder']))
515
+ return WP_CONTENT_DIR . '/cache/hyper-cache';
516
+ else
517
+ return $this->options['folder'];
518
+ }
519
+
520
+ function text_to_list($text) {
521
+ $list = array();
522
+ $items = explode("\n", str_replace(array("\n", "\r"), "\n", $text));
523
+ foreach ($items as &$item) {
524
+ $item = trim($item);
525
+ if ($item == '')
526
+ continue;
527
+ $list[] = $item;
528
+ }
529
+ return $list;
530
+ }
531
+
532
+ }
533
+
534
+ /*
535
+ function hyper_cache_remove_protocol($buffer) {
536
+
537
+ $buffer = str_ireplace('"http://', '"//', $buffer);
538
+ $buffer = str_ireplace('\'http://', '\'//', $buffer);
539
+ return $buffer;
540
+
541
+ $parts = parse_url(get_home_url());
542
+ $buffer = str_ireplace('http://' . $parts['host'], '//' . $parts['host'], $buffer);
543
+ $buffer = str_ireplace('https://' . $parts['host'], '//' . $parts['host'], $buffer);
544
+ return $buffer;
545
+
546
+ }
547
+
548
+ */
549
+
550
+ function hyper_cache_cdn_callback($matches) {
551
+ //error_log($matches[1]);
552
+ $parts = parse_url($matches[2]);
553
+ //$return = $parts['scheme'] . '://' . $parts['host'] . $parts['path'];
554
+ $return = HyperCache::$instance->options['cdn_url'] . $parts['path'];
555
+
556
+ if (!empty($parts['query'])) {
557
+ $return .= '?' . $parts['query'];
558
+ }
559
+ return $matches[1] . $return . $matches[3];
560
+ }
561
+
562
+ function hyper_cache_callback($buffer) {
563
+ global $cache_stop, $lite_cache, $hyper_cache_stop, $hyper_cache_group, $hyper_cache_is_mobile, $hyper_cache_gzip_accepted;
564
+
565
+ $buffer = trim($buffer);
566
+
567
+ if (strlen($buffer) == 0) {
568
+ return '';
569
+ }
570
+
571
+ $options = HyperCache::$instance->options;
572
+
573
+ // Replace the CDN Url
574
+ if (isset($options['cdn_enabled'])) {
575
+ $parts = parse_url(get_option('home'));
576
+ $base = quotemeta($parts['scheme'] . '://' . $parts['host']);
577
+ $base = quotemeta('http://' . $parts['host']);
578
+
579
+ $buffer = preg_replace_callback("#(<img.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
580
+ $buffer = preg_replace_callback("#(<script.+src=[\"'])(" . $base . ".*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
581
+ $buffer = preg_replace_callback("#(<link.+href=[\"'])(" . $base . ".*\.css.*)([\"'])#U", 'hyper_cache_cdn_callback', $buffer);
582
+ }
583
+
584
+ $buffer = apply_filters('cache_buffer', $buffer);
585
+
586
+ if ($cache_stop || $hyper_cache_stop) {
587
+
588
+ if (isset($options['gzip_on_the_fly']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
589
+ header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
590
+ header('Vary: Accept-Encoding,User-Agent');
591
+ header('Content-Encoding: gzip');
592
+ header('X-Hyper-Cache: gzip on the fly', false);
593
+ return gzencode($buffer, 9);
594
+ }
595
+ return $buffer;
596
+ }
597
+
598
+ $uri = hyper_cache_sanitize_uri($_SERVER['REQUEST_URI']);
599
+ $host = hyper_cache_sanitize_host($_SERVER['HTTP_HOST']);
600
+ $lc_dir = HyperCache::$instance->get_folder() . '/' . $host . $uri;
601
+
602
+ if ($hyper_cache_is_mobile) {
603
+ // Bypass (should no need since there is that control on advanced-cache.php)
604
+ if ($options['mobile'] == 2) {
605
+ if (isset($options['gzip_on_the_fly']) && $hyper_cache_gzip_accepted && function_exists('gzencode')) {
606
+ header('Cache-Control: private, max-age=0, no-cache, no-transform', false);
607
+ header('Vary: Accept-Encoding,User-Agent');
608
+ header('Content-Encoding: gzip');
609
+ header('X-Hyper-Cache: mobile, gzip on the fly', false);
610
+ return gzencode($buffer, 9);
611
+ }
612
+ return $buffer;
613
+ }
614
+ }
615
+
616
+ if (is_404()) {
617
+ $lc_file = HyperCache::$instance->get_folder() . '/' . strtolower($_SERVER['HTTP_HOST']) . '/404.html';
618
+ } else {
619
+ $lc_file = $lc_dir . '/index' . $hyper_cache_group . '.html';
620
+
621
+ if (!is_dir($lc_dir)) {
622
+ wp_mkdir_p($lc_dir);
623
+ }
624
+ }
625
+
626
+ if (!isset($options['reject_comment_authors']) && is_singular() && !is_feed() && !is_user_logged_in()) {
627
+ $script = '<script>';
628
+ $script .= 'function lc_get_cookie(name) {';
629
+ $script .= 'var c = document.cookie;';
630
+ $script .= 'if (c.indexOf(name) != -1) {';
631
+ $script .= 'var x = c.indexOf(name)+name.length+1;';
632
+ $script .= 'var y = c.indexOf(";",x);';
633
+ $script .= 'if (y < 0) y = c.length;';
634
+ $script .= 'return decodeURIComponent(c.substring(x,y));';
635
+ $script .= '} else return "";}';
636
+ $script .= 'if ((d = document.getElementById("commentform")) != null) { e = d.elements;';
637
+ $script .= 'var z = lc_get_cookie("comment_author_email_' . COOKIEHASH . '");';
638
+ $script .= 'if (z != "") e["email"].value = z;';
639
+ $script .= 'z = lc_get_cookie("comment_author_' . COOKIEHASH . '");';
640
+ $script .= 'if (z != "") e["author"].value = z.replace(/\+/g, " ");';
641
+ $script .= 'z = lc_get_cookie("comment_author_url_' . COOKIEHASH . '");';
642
+ $script .= 'if (z != "") e["url"].value = z;';
643
+ $script .= '}';
644
+ $script .= '</script>';
645
+ $x = strrpos($buffer, '</body>');
646
+ if ($x) {
647
+ $buffer = substr($buffer, 0, $x) . $script . '</body></html>';
648
+ } else {
649
+ $buffer .= $script;
650
+ }
651
+ }
652
+ hyper_cache_header($lc_file);
653
+ @file_put_contents($lc_file, $buffer . '<!-- hyper cache ' . date('Y-m-d h:i:s') . ' -->');
654
+
655
+ // Saves the gzipped version
656
+ if (isset($options['gzip'])) {
657
+ $gzf = gzopen($lc_file . '.gz', 'wb9');
658
+ if ($gzf !== false) {
659
+ gzwrite($gzf, $buffer . '<!-- hyper cache gzip ' . date('Y-m-d h:i:s') . ' -->');
660
+ gzclose($gzf);
661
+ }
662
+ }
663
+ return $buffer;
664
+ }
665
+
666
+ if (!function_exists('hyper_cache_sanitize_uri')) {
667
+
668
+ function hyper_cache_sanitize_uri($uri) {
669
+ $uri = preg_replace('|[^a-zA-Z0-9/\-_]+|', '_', $uri);
670
+ $uri = preg_replace('|/+|', '/', $uri);
671
+ $uri = rtrim($uri, '/');
672
+ if (empty($uri) || $uri[0] != '/') {
673
+ $uri = '/' . $uri;
674
+ }
675
+ return $uri;
676
+ }
677
+
678
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,156 +1,202 @@
1
- === Hyper Cache ===
2
- Tags: cache,performance,staticizer,apache,htaccess,tuning,speed,bandwidth,optimization,tidy,gzip,compression,server load,boost
3
- Requires at least: 2.5
4
- Tested up to: 4.1
5
- Stable tag: trunk
6
- Donate link: http://www.satollo.net/donations
7
- Contributors: satollo
8
-
9
- Hyper Cache is a performant and easy to configure cache system for WordPress.
10
-
11
- == Description ==
12
-
13
- Hyper Cache is a cache plugin specifically written to get the maximum
14
- speed for your WordPress blog. It can be used in low resources hosting as well
15
- on high end servers.
16
-
17
- Hyper Cache is purely PHP and works on every blog: no complex configurations are need
18
- and when you deactivate it no stale setting are left floating around.
19
-
20
- Short list of features:
21
-
22
- * Mobile aware: double cache for desktop and mobile site versions
23
- * Mobile theme switch option: change the theme on mobile device detection
24
- * Able to serve expired pages to bots to increase the perceived speed by bots
25
- * Manages compression even on the fly for non cached pages
26
- * Lots of configurable bypasses: matching cookies, matching urls, user agents, ...
27
- * Comments aware: is able to serve cached pages even to visitors who commented the blog (perfect for
28
- blog with great readers paritipation)
29
- * Cache folder can be moved outside your blog space to exclude it from backups
30
- * Controls over cache cleaning on blog events (post edited, comments, ...)
31
- * Autoclean to controls the cache used disk space
32
- * CDN support (experimental)
33
- * Other special options
34
- * Response header signature to check the working status
35
-
36
- More can be read on the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache).
37
-
38
- Other plugins by Stefano Lissa:
39
-
40
- * [Newsletter](http://www.thenewsletterplugin.com)
41
- * [Header and Footer](http://www.satollo.net/plugins/header-footer)
42
- * [Include Me](http://www.satollo.net/plugins/include-me)
43
-
44
-
45
- == Installation ==
46
-
47
- 1. Put the plugin folder into [wordpress_dir]/wp-content/plugins/
48
- 2. Go into the WordPress admin interface and activate the plugin
49
- 3. Optional: go to the options page and configure the plugin
50
-
51
- == Frequently Asked Questions ==
52
-
53
- See the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache) or
54
- the [Hyper Cache official forum](http://www.satollo.net/forums/forum/hyper-cache-plugin).
55
-
56
- == Screenshots ==
57
-
58
- 1. The main configuration panel
59
-
60
- 2. Configuration of bypasses (things you want/not want to be cached)
61
-
62
- 3. Mobile devices configuration
63
-
64
- == Changelog ==
65
-
66
- = 3.1.8 =
67
-
68
- * Fixed the comment awaiting notification cached
69
-
70
- = 3.1.7 =
71
-
72
- * Added experimental support for CDN
73
- * Added on-the-fly compression
74
- * Fixed some headers
75
-
76
- = 3.1.6 =
77
-
78
- * Fixed the post trashing detection
79
-
80
- = 3.1.5 =
81
-
82
- * Tidy option removed
83
-
84
- = 3.1.4 =
85
-
86
- * Fixed an error log always active
87
-
88
- = 3.1.3 =
89
-
90
- * Fixed the agents bypass
91
- * Added the "serve expired pages to bots" options
92
- * Added the readfile/file_get_contents switch
93
- * Fixed the draft saving triggering a cache invalidation
94
- * Added distinct cache clean for home and archives
95
- * Added debug logging when HYPER_CACHE_LOG is true (define it on wp-config.php)
96
- * Fixed the + sign on comment author
97
-
98
- = 3.1.2 =
99
-
100
- * Fixed comment author cookie clean
101
-
102
- = 3.1.1 =
103
-
104
- * fixed a PHP warning on options panel when clearing an empty cache
105
- * pot file added
106
- * possible fix for after update messages that saving is needed
107
-
108
- = 3.1.0 =
109
-
110
- * Fixed the cookie bypass
111
- * Removed a debug notice
112
- * Added HTTPS separated cache
113
- * Improved code performance
114
-
115
- = 3.0.6 =
116
-
117
- * readme.txt fix
118
- * WP 4.0 compatibility check
119
- * Fixed invalidation on draft saving
120
-
121
- = 3.0.5 =
122
-
123
- * Fixed analysis of URL with commas and dots
124
- * Improved the categories invalidation with /%category% permalink
125
-
126
- = 3.0.4 =
127
-
128
- * Help texts fixed
129
-
130
- = 3.0.3 =
131
-
132
- * Fixed the autoclean when max cached page age is set to 0
133
- * Changed a little the mobile agent list
134
-
135
- = 3.0.2 =
136
-
137
- * Added the browser caching option
138
- * Fixed a cache header
139
- * Fixed warning on cache size if empty
140
-
141
- = 3.0.1 =
142
-
143
- * Short description fix on plugin.php
144
- * Forum link fix on readme.txt
145
- * More help on comment authors option
146
-
147
- = 3.0.0 =
148
-
149
- * Totally rewritten to include the Lite Cache features
150
-
151
- = To Do =
152
-
153
- * Register an action to clean the cache by other plugin
154
- * Separated cache for https
155
- * Invalidation of categories paths when /%category%/%postname% is used
156
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Hyper Cache ===
2
+ Tags: cache,performance,staticizer,apache,htaccess,tuning,speed,bandwidth,optimization,tidy,gzip,compression,server load,boost
3
+ Requires at least: 2.5
4
+ Tested up to: 4.7.5
5
+ Stable tag: 3.2.7
6
+ Donate link: http://www.satollo.net/donations
7
+ Contributors: satollo
8
+
9
+ Hyper Cache is a performant and easy to configure cache system for WordPress.
10
+
11
+ == Description ==
12
+
13
+ Hyper Cache is a cache plugin specifically written to get the maximum
14
+ speed for your WordPress blog. It can be used in low resources hosting as well
15
+ on high end servers.
16
+
17
+ Hyper Cache is **purely PHP** and works on **every blog**: no complex configurations are needed
18
+ and when you deactivate it no stale settings are left around.
19
+
20
+ Short list of features:
21
+
22
+ * Mobile aware: double cache for desktop and mobile site versions
23
+ * HTTPS ready
24
+ * Mobile theme switch option: change the theme on mobile device detection
25
+ * Able to serve expired pages to bots to increase the perceived blog speed by bots
26
+ * Manages compression even on the fly for non cached pages
27
+ * Lots of configurable bypasses: matching cookies, matching urls, user agents, ...
28
+ * Comments aware: is able to serve cached pages even to visitors who commented the blog (perfect for
29
+ blog with great readers paritipation)
30
+ * Cache folder can be moved outside your blog space to exclude it from backups
31
+ * Controls over cache cleaning on blog events (post edited, comments, ...)
32
+ * Autoclean to controls the cache used disk space
33
+ * CDN support
34
+ * Other special options
35
+ * Response header signature to check the working status
36
+ * bbPress specific integration
37
+
38
+ More can be read on the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache).
39
+
40
+ You can further optimize the blog installing [Autoptimize](https://wordpress.org/plugins/autoptimize/)
41
+ which cleans up the HTML, minifies and concatenates CSS and JavaScript.
42
+
43
+ Other plugins by Stefano Lissa:
44
+
45
+ * [Newsletter](http://www.thenewsletterplugin.com)
46
+ * [Header and Footer](http://www.satollo.net/plugins/header-footer)
47
+ * [Include Me](http://www.satollo.net/plugins/include-me)
48
+ * [Comment Plus](http://www.satollo.net/plugins/comment-plus)
49
+
50
+ == Installation ==
51
+
52
+ 1. Put the plugin folder into [wordpress_dir]/wp-content/plugins/
53
+ 2. Go into the WordPress admin interface and activate the plugin
54
+ 3. Optional: go to the options page and configure the plugin
55
+
56
+ == Frequently Asked Questions ==
57
+
58
+ See the [Hyper Cache official page](http://www.satollo.net/plugins/hyper-cache) or
59
+ the [Hyper Cache official forum](http://www.satollo.net/forums/forum/hyper-cache-plugin).
60
+
61
+ == Screenshots ==
62
+
63
+ 1. The main configuration panel
64
+
65
+ 2. Configuration of bypasses (things you want/not want to be cached)
66
+
67
+ 3. Mobile devices configuration
68
+
69
+ == Changelog ==
70
+
71
+ = 3.2.7 =
72
+
73
+ * Minor code review
74
+ * Removed cookie based cache disabling
75
+
76
+ = 3.2.6 =
77
+
78
+ * Fixed the cache invalidation for bbPress new topic
79
+
80
+ = 3.2.5 =
81
+
82
+ * Improved integration with [Autoptimize](https://wordpress.org/plugins/autoptimize/)
83
+ * Compatibility check with WP 4.4.2
84
+
85
+ = 3.2.4 =
86
+
87
+ * Cache headers changed
88
+ * URI sanitization changed
89
+
90
+ = 3.2.3 =
91
+
92
+ * Slash and non slash ending URLs are now treated in the same way since canonicals avoid the double indexing
93
+
94
+ = 3.2.2 =
95
+
96
+ * Added check for gz file write error
97
+ * Added the gzip on the fly option
98
+
99
+ = 3.2.1 =
100
+
101
+ * Fixed link rel canonica rewrite with the cdn active
102
+
103
+ = 3.2.0 =
104
+
105
+ * Fixed the options delete function
106
+
107
+ = 3.1.9 =
108
+
109
+ * Fixed translations
110
+ * Reviewed CDN options (now available to all)
111
+
112
+ = 3.1.8 =
113
+
114
+ * Fixed the comment awaiting notification cached
115
+
116
+ = 3.1.7 =
117
+
118
+ * Added experimental support for CDN
119
+ * Added on-the-fly compression
120
+ * Fixed some headers
121
+
122
+ = 3.1.6 =
123
+
124
+ * Fixed the post trashing detection
125
+
126
+ = 3.1.5 =
127
+
128
+ * Tidy option removed
129
+
130
+ = 3.1.4 =
131
+
132
+ * Fixed an error log always active
133
+
134
+ = 3.1.3 =
135
+
136
+ * Fixed the agents bypass
137
+ * Added the "serve expired pages to bots" options
138
+ * Added the readfile/file_get_contents switch
139
+ * Fixed the draft saving triggering a cache invalidation
140
+ * Added distinct cache clean for home and archives
141
+ * Added debug logging when HYPER_CACHE_LOG is true (define it on wp-config.php)
142
+ * Fixed the + sign on comment author
143
+
144
+ = 3.1.2 =
145
+
146
+ * Fixed comment author cookie clean
147
+
148
+ = 3.1.1 =
149
+
150
+ * fixed a PHP warning on options panel when clearing an empty cache
151
+ * pot file added
152
+ * possible fix for after update messages that saving is needed
153
+
154
+ = 3.1.0 =
155
+
156
+ * Fixed the cookie bypass
157
+ * Removed a debug notice
158
+ * Added HTTPS separated cache
159
+ * Improved code performance
160
+
161
+ = 3.0.6 =
162
+
163
+ * readme.txt fix
164
+ * WP 4.0 compatibility check
165
+ * Fixed invalidation on draft saving
166
+
167
+ = 3.0.5 =
168
+
169
+ * Fixed analysis of URL with commas and dots
170
+ * Improved the categories invalidation with /%category% permalink
171
+
172
+ = 3.0.4 =
173
+
174
+ * Help texts fixed
175
+
176
+ = 3.0.3 =
177
+
178
+ * Fixed the autoclean when max cached page age is set to 0
179
+ * Changed a little the mobile agent list
180
+
181
+ = 3.0.2 =
182
+
183
+ * Added the browser caching option
184
+ * Fixed a cache header
185
+ * Fixed warning on cache size if empty
186
+
187
+ = 3.0.1 =
188
+
189
+ * Short description fix on plugin.php
190
+ * Forum link fix on readme.txt
191
+ * More help on comment authors option
192
+
193
+ = 3.0.0 =
194
+
195
+ * Totally rewritten to include the Lite Cache features
196
+
197
+ = To Do =
198
+
199
+ * Register an action to clean the cache by other plugin
200
+ * Separated cache for https
201
+ * Invalidation of categories paths when /%category%/%postname% is used
202
+