Setup CachedSession url cache by patterns
MODIFY
plextraktsync/factory.py
plextraktsync/factory.py
@@ -79,10 +79,10 @@ def server_config(self):
def session(self):
from requests_cache import CachedSession
- config = self.config
- session = CachedSession(config.cache_path)
-
- return session
+ return CachedSession(
+ cache_name=self.config.cache_path,
+ urls_expire_after=self.config.http_cache.urls_expire_after,
+ )
@cached_property
def sync(self):

Setup CachedSession url cache by patterns