Class WebSiteResourceCache


  • @ThreadSafe
    public final class WebSiteResourceCache
    extends Object
    A global cache for WebSiteResource objects, to avoid the hash calculation over and over again.
    Author:
    Philip Helger
    • Method Detail

      • isSilentMode

        public static boolean isSilentMode()
        Returns:
        true if logging is disabled, false if it is enabled.
      • setSilentMode

        public static boolean setSilentMode​(boolean bSilentMode)
        Enable or disable certain regular log messages.
        Parameters:
        bSilentMode - true to disable logging, false to enable logging
        Returns:
        The previous value of the silent mode.
      • isCacheEnabled

        public static boolean isCacheEnabled()
        Returns:
        true if the cache is globally enabled, false if the cache is disabled.
      • setCacheEnabled

        public static void setCacheEnabled​(boolean bCacheEnabled)
        Globally enabled or disable the cache.
        Parameters:
        bCacheEnabled - true to enable it, false to disable it.
      • clearCache

        @Nonnull
        public static com.helger.commons.state.EChange clearCache()
        Remove all items contained in the cache.
        Returns:
        EChange