开发者

Is there a way to programmatically access the Apache Velocity cache?

开发者 https://www.devze.com 2023-03-14 03:30 出处:网络
My web ap开发者_JAVA技巧plication is using Velocity, and my resource loader has caching enabled.Is it possible to manually access the values in the cache?All I really need to do is remove a particular

My web ap开发者_JAVA技巧plication is using Velocity, and my resource loader has caching enabled. Is it possible to manually access the values in the cache? All I really need to do is remove a particular entry at a given time.


I think this should reset the template cache:

VelocityEngine velocity = new VelocityEngine();
velocity.getTemplate("tpl.vm").touch();
0

精彩评论

暂无评论...
验证码 换一张
取 消