This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git


The following commit(s) were added to refs/heads/master by this push:
     new 11cc29d  Update ResourceManagerImpl.java
     new bb5a9d6  Merge pull request #24 from luryson/patch-3
11cc29d is described below

commit 11cc29d65fcadca5964b7e6b7aadb8545c292b67
Author: luryson <[email protected]>
AuthorDate: Mon Jun 21 14:53:49 2021 +0800

    Update ResourceManagerImpl.java
    
    invoke touch() to set nextCheck field, otherwise template will be refreshed 
every time after first expiration
---
 .../java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 4acc602..82843ac 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;

Reply via email to