[ 
https://issues.apache.org/jira/browse/VELOCITY-868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yann Nicolas updated VELOCITY-868:
----------------------------------
    Description: 
The documentation of the usage of the resource cache is not correct and 
incomplete. The user needs to see the source code to find the cache 
configuration.

h4. The cache size property name
In the developer guide 
(http://velocity.apache.org/engine/devel/developer-guide.html#resourcemanagerandcache)
 and in the JavaDoc 
(src/main/java/org/apache/velocity/runtime/RuntimeConstants.java), it is 
written that the property to set the size of the cache is 
"resource.manager.cache.size", however this property is not used and the 
correct one is "resource.manager.defaultcache.size":

{code:title=RuntimeConstants.java|borderStyle=solid}
//...
/** The <code>resource.manager.cache.size</code> property specifies the cache 
upper bound (if relevant). */
125         String RESOURCE_MANAGER_DEFAULTCACHE_SIZE = 
"resource.manager.defaultcache.size";
{code}

{quote}
Velocity to set the size for your cache, use the configuration key:
resource.manager.cache.size
{quote}

h4. The cache size unit
Also, it is not documented what is the unit of the cache size. It is the number 
of elements in the cache but it could be understood as size in Bytes.

h4. The default size of the cache
The default cache size is 89, but this is not documented. The documentation 
seems to indicate that the cache is by default unbounded: 
{quote}
A resource cache implementation may want to limit the cache size (rather than 
providing an unbounded cache which could consume all available memory).
{quote}

  was:
The documentation of the usage of the resource cache is not correct and 
incomplete. The user needs to see the source code to find the cache 
configuration.

h4. The cache size property name
In the developer guide 
(http://velocity.apache.org/engine/devel/developer-guide.html#resourcemanagerandcache)
 and in the JavaDoc 
(src/main/java/org/apache/velocity/runtime/RuntimeConstants.java), it is 
written that the property to modify to set the size of the cache is 
"resource.manager.cache.size", however this property is not used and the 
correct one is "resource.manager.defaultcache.size":

{code:title=RuntimeConstants.java|borderStyle=solid}
//...
/** The <code>resource.manager.cache.size</code> property specifies the cache 
upper bound (if relevant). */
125         String RESOURCE_MANAGER_DEFAULTCACHE_SIZE = 
"resource.manager.defaultcache.size";
{code}

{quote}
Velocity to set the size for your cache, use the configuration key:
resource.manager.cache.size
{quote}

h4. The cache size unit
Also, it is not documented what is the unit of the cache size. It is the number 
of elements in the cache but it could be understood as size in Bytes.

h4. The default size of the cache
The default cache size is 89, but this is not documented. The documentation 
seems to indicate that the cache is by default unbounded: 
{quote}
A resource cache implementation may want to limit the cache size (rather than 
providing an unbounded cache which could consume all available memory).
{quote}


> The resource manager cache size configuration is not correctly documented
> -------------------------------------------------------------------------
>
>                 Key: VELOCITY-868
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-868
>             Project: Velocity
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.7, 2.x
>         Environment: Any
>            Reporter: Yann Nicolas
>
> The documentation of the usage of the resource cache is not correct and 
> incomplete. The user needs to see the source code to find the cache 
> configuration.
> h4. The cache size property name
> In the developer guide 
> (http://velocity.apache.org/engine/devel/developer-guide.html#resourcemanagerandcache)
>  and in the JavaDoc 
> (src/main/java/org/apache/velocity/runtime/RuntimeConstants.java), it is 
> written that the property to set the size of the cache is 
> "resource.manager.cache.size", however this property is not used and the 
> correct one is "resource.manager.defaultcache.size":
> {code:title=RuntimeConstants.java|borderStyle=solid}
> //...
> /** The <code>resource.manager.cache.size</code> property specifies the cache 
> upper bound (if relevant). */
> 125       String RESOURCE_MANAGER_DEFAULTCACHE_SIZE = 
> "resource.manager.defaultcache.size";
> {code}
> {quote}
> Velocity to set the size for your cache, use the configuration key:
> resource.manager.cache.size
> {quote}
> h4. The cache size unit
> Also, it is not documented what is the unit of the cache size. It is the 
> number of elements in the cache but it could be understood as size in Bytes.
> h4. The default size of the cache
> The default cache size is 89, but this is not documented. The documentation 
> seems to indicate that the cache is by default unbounded: 
> {quote}
> A resource cache implementation may want to limit the cache size (rather than 
> providing an unbounded cache which could consume all available memory).
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to