Skip to content

Commit cc376ac

Browse files
committed
Clarify setCacheMillis/setCacheSeconds vs java.util.ResourceBundle
Closes gh-24563
1 parent 10c9d2f commit cc376ac

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -160,8 +160,9 @@ protected boolean isFallbackToSystemLocale() {
160160
/**
161161
* Set the number of seconds to cache loaded properties files.
162162
* <ul>
163-
* <li>Default is "-1", indicating to cache forever (just like
164-
* {@code java.util.ResourceBundle}).
163+
* <li>Default is "-1", indicating to cache forever (matching the default behavior
164+
* of {@code java.util.ResourceBundle}). Note that this constant follows Spring
165+
* conventions, not {@link java.util.ResourceBundle.Control#getTimeToLive}.
165166
* <li>A positive number will cache loaded properties files for the given
166167
* number of seconds. This is essentially the interval between refresh checks.
167168
* Note that a refresh attempt will first check the last-modified timestamp
@@ -184,8 +185,9 @@ public void setCacheSeconds(int cacheSeconds) {
184185
* Set the number of milliseconds to cache loaded properties files.
185186
* Note that it is common to set seconds instead: {@link #setCacheSeconds}.
186187
* <ul>
187-
* <li>Default is "-1", indicating to cache forever (just like
188-
* {@code java.util.ResourceBundle}).
188+
* <li>Default is "-1", indicating to cache forever (matching the default behavior
189+
* of {@code java.util.ResourceBundle}). Note that this constant follows Spring
190+
* conventions, not {@link java.util.ResourceBundle.Control#getTimeToLive}.
189191
* <li>A positive number will cache loaded properties files for the given
190192
* number of milliseconds. This is essentially the interval between refresh checks.
191193
* Note that a refresh attempt will first check the last-modified timestamp

0 commit comments

Comments
 (0)