deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject deltaspike git commit: improve TypedResolver docs
Date Thu, 19 May 2016 06:40:18 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 172983ff1 -> 351b56369

improve TypedResolver docs


Branch: refs/heads/master
Commit: 351b563693ca0faa5bf4e9e74e53aeed32c53974
Parents: 172983f
Author: Mark Struberg <>
Authored: Thu May 19 08:38:42 2016 +0200
Committer: Mark Struberg <>
Committed: Thu May 19 08:38:42 2016 +0200

 documentation/src/main/asciidoc/configuration.adoc | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/documentation/src/main/asciidoc/configuration.adoc b/documentation/src/main/asciidoc/configuration.adoc
index 89f199c..24af969 100644
--- a/documentation/src/main/asciidoc/configuration.adoc
+++ b/documentation/src/main/asciidoc/configuration.adoc
@@ -141,6 +141,7 @@ cached in the ConfigResolver but might be cached in the ConfigSources.
 This makes the overall calculation a bit slower, but allows for values
 to change dynamically if someone likes to for example implement a
 `JmxConfigSource` (not yet part of DeltaSpike, but easily implementable).
+You can also use the <<configuration.adoc#DynamicReloading,TypedResolver>> with
the `cacheFor(TimeUnit, long)` setting to cache the resolved values on the caller side.
 === Variable Replacement in Configured Values
@@ -245,6 +246,9 @@ connecTo( urlConfig.getValue() );
 The sample above will log any value changes in the configuration (`logChanges(true)`) and
internally cache the configured value for 5 minutes (`cacheFor(TimeUnit.MINUTES, 5)`).
 Only after that time the configured value will get evaluate again.
+TIP: Note that the 'cache' is only held within the very TypedResolver instance.
+If you use different `TypedResolver` instances (e.g. in different classes) then you might
get different cache timeouts.
 === Injection of configured values into beans using @ConfigProperty
 DeltaSpike provides a way to inject configured values into your code via the qualifier `@ConfigProperty`.

View raw message