feat: base 启动时缓存perms_alld_list

This commit is contained in:
caoqianming 2024-10-09 13:55:41 +08:00
parent 4b64903910
commit bf2c330c0f
1 changed files with 6 additions and 0 deletions

View File

@ -12,4 +12,10 @@ class SystemConfig(AppConfig):
from server.settings import get_sysconfig
get_sysconfig(reload=True)
cache.set('cache_sysconfig_need_task', False, timeout=30)
if cache.get('cache_alldperms_task', True):
from apps.utils.permission import get_alld_perms
get_alld_perms(update_cache=True)
cache.set('cache_alldperms_task', False, timeout=30)
return super().ready()