newTieredCacheInterceptor function
Creates a new Interceptor
backed by a primary and a secondary Cache
pattern
: All the calls with a url matching this pattern will be cachedprimary
: The primary cachesecondary
: The secondary cache
Returns a Interceptor
Implementation
Interceptor newTieredCacheInterceptor(
String pattern, Cache primary, Cache secondary) {
return newCacheInterceptor(pattern, newTieredCache(primary, secondary));
}