diff options
author | Claude Brisson <cbrisson@apache.org> | 2021-07-07 16:18:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 16:18:16 +0200 |
commit | bb5a9d605e756b9bd36eef976870162f9d398da3 (patch) | |
tree | 36ec5da908e17aafd1f55c25917e3202fd02fffa | |
parent | 68bcad2bdc7d2c191c8f1477087318aef4eaf1d2 (diff) | |
parent | 11cc29d65fcadca5964b7e6b7aadb8545c292b67 (diff) | |
download | apache-velocity-engine-bb5a9d605e756b9bd36eef976870162f9d398da3.tar.gz |
Merge pull request #24 from luryson/patch-3
fix: touch resource 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.java | 3 |
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; |