Class CacheFirstFetcher

  • All Implemented Interfaces:
    ResponseFetcher

    public final class CacheFirstFetcher
    extends java.lang.Object
    implements ResponseFetcher
    Signals the apollo client to first fetch the data from the normalized cache. If it's not present in the normalized cache or if an exception occurs while trying to fetch it from the normalized cache, then the data is instead fetched from the network.
    • Constructor Detail

      • CacheFirstFetcher

        public CacheFirstFetcher()
    • Method Detail

      • provideInterceptor

        public ApolloInterceptor provideInterceptor​(com.apollographql.apollo.api.internal.ApolloLogger apolloLogger)
        Specified by:
        provideInterceptor in interface ResponseFetcher
        Parameters:
        apolloLogger - A ApolloLogger to log relevant fetch information.
        Returns:
        The ApolloInterceptor that executes the fetch logic.