aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluryson <luryson@qq.com>2021-06-21 14:53:49 +0800
committerGitHub <noreply@github.com>2021-06-21 14:53:49 +0800
commit11cc29d65fcadca5964b7e6b7aadb8545c292b67 (patch)
tree36ec5da908e17aafd1f55c25917e3202fd02fffa
parent68bcad2bdc7d2c191c8f1477087318aef4eaf1d2 (diff)
downloadapache-velocity-engine-11cc29d65fcadca5964b7e6b7aadb8545c292b67.tar.gz
Update ResourceManagerImpl.java
invoke touch() to set nextCheck field, otherwise template will be refreshed every time after first expiration
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
index 4acc602d..82843ac1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
@@ -561,7 +561,8 @@ public class ResourceManagerImpl
newResource.process();
newResource.setLastModified(howOldItWas);
resource = newResource;
-
+ resource.touch();
+
globalCache.put(resourceKey, newResource);
}
return resource;