directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaromir Hamala (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRECTMEMORY-31) Cache configuration from config file
Date Wed, 06 Feb 2013 23:34:13 GMT

    [ https://issues.apache.org/jira/browse/DIRECTMEMORY-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572997#comment-13572997
] 

Jaromir Hamala commented on DIRECTMEMORY-31:
--------------------------------------------

I could look at this. I assumes existence of CacheManager which is not true ATM.
                
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message