From c9dc659df2aed811d07dcea1b4a86d4ca1cdeff9 Mon Sep 17 00:00:00 2001 From: Rhilip Date: Sun, 21 Jul 2019 15:24:20 +0800 Subject: [PATCH] feat(Redis): Add mutiDelete() function for Redis 1. Add mutiDelete() function for Redis 2. Fix Namespace of ubbcode format --- framework/Redis/BaseRedisConnection.php | 4 ++++ framework/View/Conversion.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/Redis/BaseRedisConnection.php b/framework/Redis/BaseRedisConnection.php index bd5734d..d968577 100644 --- a/framework/Redis/BaseRedisConnection.php +++ b/framework/Redis/BaseRedisConnection.php @@ -304,6 +304,10 @@ public function typeof($key): ?string } } + public function mutiDelete($pattern) { + return $this->del($this->keys($pattern)); + } + public function getCalledData() { return $this->_calledData; diff --git a/framework/View/Conversion.php b/framework/View/Conversion.php index a05a27b..8ead24d 100644 --- a/framework/View/Conversion.php +++ b/framework/View/Conversion.php @@ -71,7 +71,7 @@ public function format_ubbcode($var) self::setDefault($var, ['escapeHtml' => true]); $string = array_shift($var); - $code = new Decoda($string, $var,'Post_cache:' . md5($string)); + $code = new Decoda($string, $var,'Cache:post:' . md5($string)); $code->defaults(); // TODO add support of tag [mediainfo] , [nfo]