2018-03-24 07:59:59 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
2019-09-17 10:04:27 +08:00
|
|
|
from __future__ import absolute_import
|
2018-03-24 07:59:59 +08:00
|
|
|
import datetime
|
|
|
|
|
|
|
|
from dogpile.cache import make_region
|
2021-03-14 07:04:18 +08:00
|
|
|
from dogpile.cache.util import sha1_mangle_key
|
2018-03-24 07:59:59 +08:00
|
|
|
|
|
|
|
#: Expiration time for show caching
|
|
|
|
SHOW_EXPIRATION_TIME = datetime.timedelta(weeks=3).total_seconds()
|
|
|
|
|
|
|
|
#: Expiration time for episode caching
|
|
|
|
EPISODE_EXPIRATION_TIME = datetime.timedelta(days=3).total_seconds()
|
|
|
|
|
|
|
|
#: Expiration time for scraper searches
|
|
|
|
REFINER_EXPIRATION_TIME = datetime.timedelta(weeks=1).total_seconds()
|
|
|
|
|
2021-03-14 07:04:18 +08:00
|
|
|
# Mangle keys to prevent long filenames
|
|
|
|
region = make_region(key_mangler=sha1_mangle_key)
|