newTieredCacheInterceptor function

Interceptor newTieredCacheInterceptor(
  1. String pattern,
  2. Cache primary,
  3. Cache secondary
)

Creates a new Interceptor backed by a primary and a secondary Cache

  • pattern: All the calls with a url matching this pattern will be cached
  • primary: The primary cache
  • secondary: The secondary cache

Returns a Interceptor

Implementation

Interceptor newTieredCacheInterceptor(
    String pattern, Cache primary, Cache secondary) {
  return newCacheInterceptor(pattern, newTieredCache(primary, secondary));
}