Add http_cache decorator
This is inverse of the no_cache decorator.
MODIFY
plex_trakt_sync/decorators/__init__.py
plex_trakt_sync/decorators/__init__.py
+from .http_cache import http_cache
from .measure_time import measure_time
from .memoize import memoize
from .nocache import nocache

ADD
plex_trakt_sync/decorators/http_cache.py
+from functools import wraps
+
+import requests_cache
+
+from plex_trakt_sync.path import trakt_cache
+
+
+def http_cache(method, expire_after=None):
+ @wraps(method)
+ def inner(self, *args, **kwargs):
+ with requests_cache.enabled(trakt_cache, expire_after=expire_after):
+ return method(self, *args, **kwargs)
+
+ return inner

Add http_cache decorator

This is inverse of the no_cache decorator.