Interface CmsCacheService

  • All Known Implementing Classes:
    DefaultCmsCacheService

    public interface CmsCacheService
    Defines an API to interact with CMS cache
    • Method Detail

      • useCache

        boolean useCache​(javax.servlet.http.HttpServletRequest request,
                         AbstractCMSComponentModel component)
        Checks if cache is enabled
        Parameters:
        request - the current request
        component - the current component
        Returns:
        true if cache is enabled
      • get

        java.lang.String get​(CacheKey key)
        Gets cache content by key
        Parameters:
        key - the cache key
        Returns:
        the cache content
      • put

        void put​(CacheKey key,
                 java.lang.String content)
        Stores cache content by key
        Parameters:
        key - the cache key
        content - the cache content
      • getKey

        CacheKey getKey​(javax.servlet.http.HttpServletRequest request,
                        AbstractCMSComponentModel component)
        Gets the cache key for the current component and request
        Parameters:
        request - the current request
        component - the current component
        Returns:
        the cache key