From 31c220605e4e9fe92f99e3cf22369f55666259de Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Wed, 24 Jul 2019 17:45:38 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=8E=88=E6=9D=83=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E8=BF=87=E6=9C=9F=E6=89=80=E6=9C=89=E7=BC=93?= =?UTF-8?q?=E5=AD=98(cache=5Fkey=E5=92=8Ccache=5Fmeta=5Fkey)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/perms/utils/asset_permission.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/perms/utils/asset_permission.py b/apps/perms/utils/asset_permission.py index 05669e152..42c4060e8 100644 --- a/apps/perms/utils/asset_permission.py +++ b/apps/perms/utils/asset_permission.py @@ -414,15 +414,12 @@ class AssetPermissionCacheMixin: cache.delete_pattern(key) self.expire_cache_meta() - @classmethod - def expire_all_cache_meta(cls): - key = cls.CACHE_META_KEY_PREFIX + '*' - cache.delete_pattern(key) - @classmethod def expire_all_cache(cls): key = cls.CACHE_KEY_PREFIX + '*' cache.delete_pattern(key) + meta_key = cls.CACHE_META_KEY_PREFIX + '*' + cache.delete_pattern(meta_key) class AssetPermissionUtil(AssetPermissionCacheMixin):