Is there a way to programmatically access the Apache Velocity cache?
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();
精彩评论