Package com.atlassian.confluence.cache
Class CachingCacheSettingsManager
java.lang.Object
com.atlassian.confluence.cache.CachingCacheSettingsManager
- All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider
,CacheSettingsManager
Caches calculation of caches settings in order to avoid traversing long list of expensive regexps
- Since:
- 5.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchangeMaxEntries
(@NonNull String name, int newValue) Change the max entries for a cache.@NonNull com.atlassian.cache.CacheSettings
getDefaults
(@NonNull String name) void
boolean
Persists all changes made so far by update* methods.
-
Constructor Details
-
CachingCacheSettingsManager
-
-
Method Details
-
changeMaxEntries
Change the max entries for a cache. Returns the previous value if it was set, or null if it was not set.- Specified by:
changeMaxEntries
in interfaceCacheSettingsManager
- Parameters:
name
- the name of the cache to updatenewValue
-- Returns:
- the previous value of the cache, if any
-
saveSettings
public boolean saveSettings()Description copied from interface:CacheSettingsManager
Persists all changes made so far by update* methods.- Specified by:
saveSettings
in interfaceCacheSettingsManager
- Returns:
- true if changes were persisted successfully
-
reloadSettings
public void reloadSettings()- Specified by:
reloadSettings
in interfaceCacheSettingsManager
-
getDefaults
- Specified by:
getDefaults
in interfacecom.atlassian.cache.CacheSettingsDefaultsProvider
-