Class ApolloHttpCache

  • All Implemented Interfaces:
    com.apollographql.apollo.api.cache.http.HttpCache

    public final class ApolloHttpCache
    extends java.lang.Object
    implements com.apollographql.apollo.api.cache.http.HttpCache
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.apollographql.apollo.api.cache.http.HttpCache

        com.apollographql.apollo.api.cache.http.HttpCache.Companion
    • Field Summary

      • Fields inherited from interface com.apollographql.apollo.api.cache.http.HttpCache

        CACHE_DO_NOT_STORE, CACHE_EXPIRE_AFTER_READ_HEADER, CACHE_EXPIRE_TIMEOUT_HEADER, CACHE_FETCH_STRATEGY_HEADER, CACHE_KEY_HEADER, CACHE_PREFETCH_HEADER, CACHE_SERVED_DATE_HEADER, Companion, FROM_CACHE
    • Constructor Summary

      Constructors 
      Constructor Description
      ApolloHttpCache​(com.apollographql.apollo.api.cache.http.HttpCacheStore cacheStore)  
      ApolloHttpCache​(com.apollographql.apollo.api.cache.http.HttpCacheStore cacheStore, com.apollographql.apollo.Logger logger)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      okhttp3.Interceptor interceptor()  
      okhttp3.Response read​(java.lang.String cacheKey)  
      okhttp3.Response read​(java.lang.String cacheKey, boolean expireAfterRead)  
      void remove​(java.lang.String cacheKey)  
      void removeQuietly​(java.lang.String cacheKey)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApolloHttpCache

        public ApolloHttpCache​(@NotNull
                               com.apollographql.apollo.api.cache.http.HttpCacheStore cacheStore)
      • ApolloHttpCache

        public ApolloHttpCache​(@NotNull
                               com.apollographql.apollo.api.cache.http.HttpCacheStore cacheStore,
                               @Nullable
                               com.apollographql.apollo.Logger logger)
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface com.apollographql.apollo.api.cache.http.HttpCache
      • remove

        public void remove​(@NotNull
                           java.lang.String cacheKey)
                    throws java.io.IOException
        Specified by:
        remove in interface com.apollographql.apollo.api.cache.http.HttpCache
        Throws:
        java.io.IOException
      • removeQuietly

        public void removeQuietly​(@NotNull
                                  java.lang.String cacheKey)
        Specified by:
        removeQuietly in interface com.apollographql.apollo.api.cache.http.HttpCache
      • read

        public okhttp3.Response read​(@NotNull
                                     java.lang.String cacheKey)
        Specified by:
        read in interface com.apollographql.apollo.api.cache.http.HttpCache
      • read

        public okhttp3.Response read​(@NotNull
                                     java.lang.String cacheKey,
                                     boolean expireAfterRead)
        Specified by:
        read in interface com.apollographql.apollo.api.cache.http.HttpCache
      • interceptor

        public okhttp3.Interceptor interceptor()
        Specified by:
        interceptor in interface com.apollographql.apollo.api.cache.http.HttpCache