Skip to content

Commit

Permalink
feat 增加大内存模式
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jul 21, 2023
1 parent 89a9bba commit fbcd5f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/modules/themoviedb/tmdb_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
lock = RLock()

CACHE_EXPIRE_TIMESTAMP_STR = "cache_expire_timestamp"
EXPIRE_TIMESTAMP = 7 * 24 * 3600
EXPIRE_TIMESTAMP = settings.CACHE_CONF.get('meta')


class TmdbCache(metaclass=Singleton):
Expand All @@ -33,10 +33,8 @@ class TmdbCache(metaclass=Singleton):
_tmdb_cache_expire: bool = True

def __init__(self):
global EXPIRE_TIMESTAMP
self._meta_path = settings.TEMP_PATH / "__tmdb_cache__"
self._meta_data = self.__load(self._meta_path)
EXPIRE_TIMESTAMP = settings.CACHE_CONF.get('meta')

def clear(self):
"""
Expand Down

0 comments on commit fbcd5f0

Please sign in to comment.