Class CachingCacheSettingsManager

java.lang.Object
com.atlassian.confluence.cache.CachingCacheSettingsManager
All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider, CacheSettingsManager

@Internal public class CachingCacheSettingsManager extends Object implements CacheSettingsManager
Caches calculation of caches settings in order to avoid traversing long list of expensive regexps
Since:
5.6
  • Constructor Details

  • Method Details

    • changeMaxEntries

      public Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
      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 interface CacheSettingsManager
      Parameters:
      name - the name of the cache to update
      newValue -
      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 interface CacheSettingsManager
      Returns:
      true if changes were persisted successfully
    • reloadSettings

      public void reloadSettings()
      Specified by:
      reloadSettings in interface CacheSettingsManager
    • getDefaults

      public @NonNull com.atlassian.cache.CacheSettings getDefaults(@NonNull String name)
      Specified by:
      getDefaults in interface com.atlassian.cache.CacheSettingsDefaultsProvider