Interface KeyHashingScheme

  • All Known Implementing Classes:
    PrefixKeyHashingScheme, SHA256KeyHashingScheme

    public interface KeyHashingScheme
    Since the HttpCacheStorage interface expects to use variant-annotated URLs for its storage keys, but Memcached has a maximum key size, we need to support mapping storage keys to cache keys. Clients can implement this interface to change the way the mapping is done (for example, to add a prefix to all cache keys to provide a form of memcached namespacing).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String hash​(java.lang.String storageKey)
      Maps a storage key to a cache key.
    • Method Detail

      • hash

        java.lang.String hash​(java.lang.String storageKey)
        Maps a storage key to a cache key. The storage key is what the higher-level HTTP cache uses as a key; the cache key is what we use as a key for talking to memcached.
        storageKey - what the higher-level HTTP cache wants to use as its key for looking up cache entries
        a cache key suitable for use with memcached