T - The type of the instances we want to cachepublic class CachedObject<T> extends Object
The invalidation of the cache will happen in a thread-safe manner. No call
to get() will return null.
| Constructor and Description |
|---|
CachedObject(Supplier<T> supplier) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Returns the current
instance or creates one if necessary. |
void |
invalidate()
Invalidates the current
instance forcing any subsequent
calls to get() to cache a new one. |
Copyright © 2026 MuleSoft, Inc.. All rights reserved.