From 698f64ec2234f04220d1c8f21937432e145108a6 Mon Sep 17 00:00:00 2001 From: rvdforst Date: Wed, 24 Nov 2021 15:45:06 +0100 Subject: [PATCH 1/2] Update Cache.php --- includes/Cache.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/Cache.php b/includes/Cache.php index 323b3e5..429347b 100644 --- a/includes/Cache.php +++ b/includes/Cache.php @@ -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 - Date: Wed, 24 Nov 2021 15:45:10 +0100 Subject: [PATCH 2/2] Update rrze-cache.php --- rrze-cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rrze-cache.php b/rrze-cache.php index 25ddc93..cd604bc 100644 --- a/rrze-cache.php +++ b/rrze-cache.php @@ -4,7 +4,7 @@ Plugin Name: RRZE Cache Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-cache Description: Advanced cache management. -Version: 2.7.1 +Version: 2.7.2 Author: RRZE-Webteam Author URI: https://blogs.fau.de/webworking/ License: GNU General Public License v2 @@ -19,7 +19,7 @@ namespace RRZE\Cache; defined('ABSPATH') || exit; const RRZE_PHP_VERSION = '7.4'; -const RRZE_WP_VERSION = '5.5'; +const RRZE_WP_VERSION = '5.8'; const RRZECACHE_META_KEY = '_rrze_cache'; const ACCESS_PERMISSION_META_KEY = '_access_permission'; // rrze-ac plugin -- GitLab