kactoos-jvm / nnl.rocks.kactoos.scalar / StickyScalar
class StickyScalar<T : Any> : Scalar<T>
Cached version of a KScalar.
This KScalar decorator technically is an in-memory cache.
Pay attention that this class is not thread-safe. It is highly recommended to always decorate it with SyncScalar.
There is no thread-safety guarantee.
T - Type of result
func - Cached func
See Also
Since 0.3
| Name | Summary |
|---|---|
| <init> | StickyScalar(scalar: KScalar<T>) |
| Name | Summary |
|---|---|
| invoke | fun invoke(): TGet value of this Scalar |