Cached Property
class CachedProperty<out T : Any, out E : Any>(instance: E, hint: CachedProperty.CacheHint, maker: E.() -> T)
Content copied to clipboard
Implementation of cached read-only property which based on another object.
Author
Alexander Kornilov (akornilov.82@gmail.com).
Parameters
instance
a tracked object. If instance implements StateTrackable interface the StateTrackable.revision will be used; Any.hashCode otherwise.
hint
a some CacheHint for cache strategy.
maker
a maker of a value which holds in a property.
Constructors
CachedProperty
Link copied to clipboard
fun <out T : Any, out E : Any> CachedProperty(instance: E, hint: CachedProperty.CacheHint = CacheHint.None, maker: E.() -> T)
Content copied to clipboard
a tracked object.
Types
CacheHint
Link copied to clipboard