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 correct cache configuration.
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":
Velocity to set the size for your cache, use the configuration key:
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.
The default cache size is 89, but this is not documented. The documentation seems to indicate that the cache is by default unbounded:
A resource cache implementation may want to limit the cache size (rather than providing an unbounded cache which could consume all available memory).