Class CacheUtil


  • public final class CacheUtil
    extends java.lang.Object
    Provides Utilities methods to manage Hibernate second level cache and Query Cache invalidations.
    Since:
    jcms-7.0.0
    Author:
    dedieu
    • Method Detail

      • removeSecondLevelCacheEntry

        public static void removeSecondLevelCacheEntry​(java.lang.String entityName,
                                                       java.lang.Long rowId)
        Removes a DBData from the second level cache.
        Parameters:
        entityName - the id of the DBData to remove in the second level cache.
        rowId - the rowId
        Throws:
        java.lang.IllegalStateException - if the cache is not Status.STATUS_ALIVE
        Since:
        jcms-7.0.0
      • removeSecondLevelCacheEntry

        public static void removeSecondLevelCacheEntry​(DBData data)
      • removeSecondLevelCacheEntry

        public static void removeSecondLevelCacheEntry​(java.lang.String jcmsId)
      • removeQueryCacheEntity

        public static void removeQueryCacheEntity​(java.lang.String entityName)
        Removes a DBData from the query cache.
        Parameters:
        entityName - the id of the DBData to remove in the second level cache.
        Throws:
        java.lang.IllegalStateException - if the cache is not Status.STATUS_ALIVE
        Since:
        jcms-7.0.0
      • removeQueryCacheEntity

        public static void removeQueryCacheEntity​(DBData data)