Commit 698f64ec authored by Rolf Forst's avatar Rolf Forst
Browse files

Update Cache.php

parent 8d3b303a
......@@ -31,12 +31,17 @@ class Cache
{
$this->setCacheFiles();
if (apply_filters('rrzecache_skip_cache', false)) {
Flush::flushCache();
return;
}
add_action('init', [$this, 'add_publish_hooks'], 99);
add_action('pre_comment_approved', [$this, 'pre_comment_approved'], 99, 2);
add_action('transition_comment_status', [$this, 'transition_comment_status'], 10, 3);
add_action('edit_comment', [$this, 'edit_comment']);
add_action('post_submitbox_misc_actions', [$this, 'post_cache_submitbox'], 99);
add_action('template_redirect', [$this, 'template_redirect'], 0);
add_action('template_redirect', [$this, 'template_redirect'], 1);
add_action('rrzecache_flush_cache_post_id', [__NAMESPACE__ . '\Flush', 'flushCacheByPostId']);
add_action('rrzecache_flush_cache_url', [__NAMESPACE__ . '\Flush', 'flushCacheByUrl']);
......@@ -185,7 +190,7 @@ class Cache
</div>
<?php endif ?>
</div>
<?php
<?php
}
public function template_redirect()
......@@ -271,10 +276,6 @@ class Cache
return true;
}
if (apply_filters('rrzecache_skip_cache', false)) {
return true;
}
if (is_search() || is_404() || is_feed() || is_trackback() || is_robots() || is_preview() || post_password_required()) {
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment