Class AbstractCacheKey

java.lang.Object
de.hybris.platform.regioncache.key.AbstractCacheKey
All Implemented Interfaces:
CacheKey
Direct Known Subclasses:
AbstractRegistrableCacheKey, CsrfParametersCacheKey, DefaultDeletedItemCacheKey, LegacyCacheKey, ObjectCacheKey, ProductConfigurationCacheKey, ProductConfigurationEHCacheAccessImplTest.StringCacheKey, TestCacheKey, WebhookDeletedItemCacheKey

public abstract class AbstractCacheKey extends Object implements CacheKey
Abstract class used as a base class for regioncache keys.
CacheKey can mark associated value as serializable or nor (CacheUnitType).
CacheKey carries information of type code (String).

Known subtypes:
  • LegacyCacheKey: used to convert between Object[] and CacheKey
  • RegistrableCacheKey: used to mark a cache unit as using cache registry
  • Field Details

    • valueType

      protected final CacheUnitValueType valueType
      Defines if associated value is SERIALIZABLE or NON_SERIALIZABLE.
      By the default values are considered NON_SERIALIZABLE. This should change in hybris 5.
    • tenantId

      protected final String tenantId
    • cachedHash

      protected int cachedHash
    • typeCode

      protected final Object typeCode
      Each key has value and type. This field keeps type.
  • Constructor Details

    • AbstractCacheKey

      public AbstractCacheKey(Object typeCode, String tenantId)
      Creates NON_SERIALIZABLE key for supplied type.
    • AbstractCacheKey

      public AbstractCacheKey(CacheUnitValueType valueType, Object typeCode, String tenantId)
      Creates key for supplied type and value type.
  • Method Details