[Feature] 离线session完成

This commit is contained in:
ibuler
2017-12-04 16:41:00 +08:00
parent 9b6696bb6e
commit 71a3079221
16 changed files with 282 additions and 257 deletions

20
apps/terminal/utils.py Normal file
View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
#
from django.core.cache import cache
from .tasks import USERS_CACHE_KEY, ASSETS_CACHE_KEY, SYSTEM_USER_CACHE_KEY
def get_user_list_from_cache():
return cache.get(USERS_CACHE_KEY)
def get_asset_list_from_cache():
return cache.get(ASSETS_CACHE_KEY)
def get_system_user_list_from_cache():
return cache.get(SYSTEM_USER_CACHE_KEY)