Package 

Class SimpleCacheKey

  • All Implemented Interfaces:
    com.facebook.cache.common.CacheKey

    
    public class SimpleCacheKey
     implements CacheKey
                        

    CacheKey implementation that is a simple wrapper around a String object.

    Users of CacheKey should construct it by providing a unique string that unambiguously identifies the cached resource.

    • Method Summary

      Modifier and Type Method Description
      String toString()
      boolean equals(@Nullable() Object o)
      int hashCode()
      boolean containsUri(Uri uri) Returns true if this key was constructed from this Uri.
      String getUriString() Returns a string representation of the URI at the heart of the cache key.
      boolean isResourceIdForDebugging() Returns true if this key was constructed from a resource ID.
      • Methods inherited from class com.facebook.cache.common.CacheKey

        equals
      • Methods inherited from class java.lang.Object

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

      • SimpleCacheKey

        SimpleCacheKey(String key)
      • SimpleCacheKey

        SimpleCacheKey(String key, boolean isResourceIdForDebugging)
    • Method Detail

      • containsUri

         boolean containsUri(Uri uri)

        Returns true if this key was constructed from this Uri.

        Used for cases like deleting all keys for a given uri.

      • getUriString

         String getUriString()

        Returns a string representation of the URI at the heart of the cache key. In cases of multiplekeys being contained, the first is returned.

      • isResourceIdForDebugging

         boolean isResourceIdForDebugging()

        Returns true if this key was constructed from a resource ID. If this ever changes, the diskcache entries corresponding to this cache key would be invalidated.