Closed 10xSebastian closed 4 years ago
@christianarevalo
Right now no matter if local cache or central cache, both apply the same provided cache options, as the same caching options apply to a multilevel cache. A multilevel cache is consider 1 cache from a client perspective, just stored on multiple level, following the same options (like expiry).
e.g.
cache: { expires_in: 1.day }
That would make both cache layers expire after 1 day.
For invalidating targeted records, we would still need to implement invalidation services (like for customers etc.). but that's not part of an http client nor interceptor implementation, but rather a dedicated service implementation.
This adds the possibility to configure multi-level (local & central) caching for the caching interceptor.
Also:
cache_expires_in
which have been deprecation warned since years nowLHC::Caching.logger
in favor of simple stdout (puts), mainly because it hasn't been used anywhereCaching Interceptor
You can also use a central http cache to be used by the
LHC::Caching
interceptor.If you configure a local and a central cache, LHC will perform multi-level-caching. LHC will try to retrieve cached information first from the central, in case of a miss from the local cache, while writing back into both.