Skip to content

Commit

Permalink
Merge pull request openmrs#1884 from AdamGrzybkowski/TRUNK-4971
Browse files Browse the repository at this point in the history
TRUNK-4971 added JavaDocs
  • Loading branch information
rkorytkowski authored Dec 2, 2016
2 parents eeccac7 + 9e93646 commit 76aa48d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/src/main/java/org/openmrs/api/cache/CacheConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;


/**
* CacheConfig provides a cache manager for the @Cacheable annotation and uses ehCache under the hood.
* The config of ehCache is loaded from ehcache-api.xml and can be extended by modules through apiCacheConfig.properties.
* For more details see the wiki page at <a href="https://wiki.openmrs.org/x/IYaEBg">https://wiki.openmrs.org/x/IYaEBg</a>
*/
@Configuration
public class CacheConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
import java.util.List;
import java.util.Map;

/**
* This class creates cache configurations from apiCacheConfig.properties files in the classpath. This file should be
* created in modules resource directory only. To configure cache in openmrs-core go to ehcache-api.xml.
* If the configuration already exist it won't be overridden.
* Example content for apiCacheConfig.properties:
* userSearchLocales.maxElementsInMemory=500
* userSearchLocales.eternal=false
* userSearchLocales.timeToIdleSeconds=300
* userSearchLocales.timeToLiveSeconds=300
* userSearchLocales.memoryStoreEvictionPolicy=LRU
*/
public class OpenmrsCacheManagerFactoryBean extends EhCacheManagerFactoryBean {

@Override
Expand Down

0 comments on commit 76aa48d

Please sign in to comment.