Skip to content

Commit

Permalink
Patch requests-cache CachedSession with niquests
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Oct 20, 2024
1 parent 888dd2b commit ed7fd3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plextraktsync/util/Factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ def urls_expire_after(self):

@cached_property
def session(self):
from requests_cache import CachedSession
# https://niquests.readthedocs.io/en/latest/community/recommended.html#requests-cache
import niquests
import requests_cache

class CachedSession(requests_cache.session.CacheMixin, niquests.Session): ...

return CachedSession(
cache_name=self.config.cache_path,
Expand Down

0 comments on commit ed7fd3d

Please sign in to comment.