configure cache to store exported games forever
This commit is contained in:
parent
932340431f
commit
b3828baa5d
1 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,12 @@ from hanabi import logger
|
|||
from hanabi import constants
|
||||
|
||||
# Cache all requests to site to reduce traffic and latency
|
||||
session = requests_cache.CachedSession(platformdirs.user_cache_dir(constants.APP_NAME) + '/hanab.live')
|
||||
session = requests_cache.CachedSession(
|
||||
platformdirs.user_cache_dir(constants.APP_NAME) + '/hanab.live',
|
||||
urls_expire_after={
|
||||
'hanab.live/export/*': requests_cache.NEVER_EXPIRE
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def get(url, refresh=False) -> Optional[Dict | str]:
|
||||
|
|
Loading…
Reference in a new issue