Update cache decorators to update session instance
MODIFY
plex_trakt_sync/decorators/http_cache.py
plex_trakt_sync/decorators/http_cache.py
from plex_trakt_sync.path import trakt_cache
cache = factory.requests_cache()
+session = factory.session()
def http_cache(method, expire_after=None):
@wraps(method)
def inner(self, *args, **kwargs):
with cache.enabled(trakt_cache, expire_after=expire_after):
+ with session.request_expire_after(expire_after):
return method(self, *args, **kwargs)
return inner

MODIFY
plex_trakt_sync/decorators/nocache.py
plex_trakt_sync/decorators/nocache.py
from plex_trakt_sync.factory import factory
cache = factory.requests_cache()
+session = factory.session()
def nocache(method):
@wraps(method)
def inner(self, *args, **kwargs):
with cache.disabled():
+ with session.cache_disabled():
return method(self, *args, **kwargs)
return inner

Update cache decorators to update session instance