Skip to content

Commit bb5a9d6

Browse files
authored
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
2 parents 68bcad2 + 11cc29d commit bb5a9d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ protected Resource refreshResource(Resource resource, final String encoding)
561561
newResource.process();
562562
newResource.setLastModified(howOldItWas);
563563
resource = newResource;
564-
564+
resource.touch();
565+
565566
globalCache.put(resourceKey, newResource);
566567
}
567568
return resource;

0 commit comments

Comments
 (0)