Cache configuration from config file
------------------------------------
Key: DIRECTMEMORY-31
URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-31
Project: Apache DirectMemory
Issue Type: New Feature
Reporter: Igor Babalich
Cache manager looks for 'directmemory.config.file' system property.
If it is found, it will use that file for instantiation of the caches.
The config file could be like this ( groovy config file ):
-----------------------------------------------------------
version=1
cache {
photos {
numberOfBuffers=10
bufferSize="5 Mb"
timeToLive="24 hours"
}
users {
numberOfBuffers=2
bufferSize=1000000
timeToLive="60 minutes"
timeToIdle="20 minutes"
}
}
------------------------------------------------------------
If 'directmemory.config.file' system property is not found then cache manager
will report a warning in the logfile and
try to find a default configuration file in the classpath with the name
'directmemory_config.groovy'
Caches can be also initialized by providing a parameter to the cache manager
with the configuration file's path, like
CacheManager.init('/path/to/config/mycache_config.groovy')
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira