Skip to content

Commit

Permalink
Enable stale_if_error, stale_while_revalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 1, 2025
1 parent 7ec1549 commit 7b5dee7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plextraktsync/factory/Factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ def session(self):
# Plex sends "Cache-Control: no-cache" headers to requests we want to cache
cache_control=False,
urls_expire_after=self.urls_expire_after,
# https://requests-cache.readthedocs.io/en/stable/user_guide/expiration.html#expiration-and-error-handling
stale_if_error=True,
# https://requests-cache.readthedocs.io/en/stable/user_guide/expiration.html#asynchronous-revalidation
stale_while_revalidate=True,
# Plex doesn't Send Vary: X-Plex-Container-Start
match_headers=["X-Plex-Container-Start"],
)
Expand Down

0 comments on commit 7b5dee7

Please sign in to comment.