@ThreadSafe public final class WebSiteResourceCache extends Object
WebSiteResource objects, to avoid the hash
calculation over and over again.| Modifier and Type | Method and Description |
|---|---|
static com.helger.commons.state.EChange |
clearCache()
Remove all items contained in the cache.
|
static WebSiteResource |
getOrCreateResource(EWebSiteResourceType eResourceType,
String sPath,
Charset aCharset) |
static boolean |
isCacheEnabled() |
static boolean |
isSilentMode() |
static com.helger.commons.state.EChange |
removeFromCache(EWebSiteResourceType eType,
String sPath) |
static void |
setCacheEnabled(boolean bCacheEnabled)
Globally enabled or disable the cache.
|
static boolean |
setSilentMode(boolean bSilentMode)
Enable or disable certain regular log messages.
|
public static boolean isSilentMode()
true if logging is disabled, false if it
is enabled.public static boolean setSilentMode(boolean bSilentMode)
bSilentMode - true to disable logging, false to enable
loggingpublic static boolean isCacheEnabled()
true if the cache is globally enabled,
false if the cache is disabled.public static void setCacheEnabled(boolean bCacheEnabled)
bCacheEnabled - true to enable it, false to disable it.@Nonnull public static WebSiteResource getOrCreateResource(@Nonnull EWebSiteResourceType eResourceType, @Nonnull @Nonempty String sPath, @Nonnull Charset aCharset)
@Nonnull public static com.helger.commons.state.EChange removeFromCache(@Nonnull EWebSiteResourceType eType, @Nonnull @Nonempty String sPath)
@Nonnull public static com.helger.commons.state.EChange clearCache()
EChangeCopyright © 2014–2023 Philip Helger. All rights reserved.