1 import os 2 import pickle 3 from .... import __CACHE_DIR__ 4 from ...utils.log import log 5 6 class MS_Cache(): 7 8 def isset(key):
17 def get(key, default_value = None): 18 value = default_value 19 if MS_Cache.isset(key): 20 with open(os.path.join(__CACHE_DIR__, key), 'rb') as f: 21 value = pickle.load(f) 22 return value 23 24 def cache_delete(key):