Class CacheFactoryManager

java.lang.Object
com.atlassian.greenhopper.cache.CacheFactoryManager

@Service public class CacheFactoryManager extends Object
A convenient accessor for getting atlassian-cache 2.0 CacheFactory in all JIRA versions. Can be removed once minimum JIRA version is 6.2.
  • Constructor Details

    • CacheFactoryManager

      public CacheFactoryManager()
  • Method Details

    • defaultCacheSettings

      public static com.atlassian.cache.compat.CacheSettings defaultCacheSettings()

      The recommendation from JIRA is to default the cache settings to expire after 30 minutes. Before using this method, ensure that you consider the scenarios under which your cache is going to be populated. If it is possible that your cache will be populated in a tight loop for all objects in the system, you do not want to use these defaults as they could result in an OutOfMemoryError.

      See VersionMetaDataManagerImpl.init(), SprintManagerImpl.init() for some examples on when custom settings should be used.

      Returns:
      a new settings object to be used when constructing new caches
    • create

      public com.atlassian.cache.compat.CacheFactory create()