com.atlassian.greenhopper.cache
Class CacheFactoryManager

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

@Service
public class CacheFactoryManager
extends java.lang.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 Summary
CacheFactoryManager()
           
 
Method Summary
 com.atlassian.cache.compat.CacheFactory create()
           
static com.atlassian.cache.compat.CacheSettings defaultCacheSettings()
           The recommendation from JIRA is to default the cache settings to expire after 30 minutes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheFactoryManager

public CacheFactoryManager()
Method Detail

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()


Copyright © 2007-2014 Atlassian. All Rights Reserved.