On Thu, 2009-01-08 at 09:46 -0800, Nathan Bubna wrote:
> That would work great for your particular setup, where you are always
> checking if the resource is already stored in the repo. Others,
> however, may expect that strings in the repo don't disappear based on
> usage anymore than a lesser-used file would disappear from the file
> system, so that really couldn't be the default implementation.
Very true. I wasn't implying that for a default to Velocity, but as a
solution to the potential memory issue in my scenario.
>
> >> You would just have to set the
> >> string.resource.loader.repository.class property or manually set the
> >> repo via:
> >>
> >> StringResourceLoader.setRepository(StringResourceLoader.REPOSITORY_NAME_DEFAULT,
> >> myStringResourceRepo);
Regarding this, we already have:
props.setProperty(
org.apache.velocity.app.VelocityEngine.RESOURCE_MANAGER_CLASS,
"com.liferay.portal.velocity.LiferayResourceManager");
props.setProperty(
org.apache.velocity.app.VelocityEngine.RESOURCE_MANAGER_CACHE_CLASS,
"com.liferay.portal.velocity.LiferayResourceCache");
Will the rendered Template objects fall into this cache anyway? If so,
is there any reason to change the repository configuration?
Thanks,
--
Raymond Augé
Senior Software Engineer
Liferay, Inc.
Enterprise. Open Source. For Life.