We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@CacheKey annotation is used along with @Freeze or @Refrigerate to define which method parameter will form the key for the cache.
@Refrigerate fun someMethodToDownloadText(@CacheKey val argument1 : String, @CacheKey val argument2 : String, val argument3 : String) : String { // method logic }
@Freeze Class cacheClass { fun someMethodToDownloadText(@CacheKey val argument1 : String, @CacheKey val argument2 : String, val argument3 : String) : String{ // method logic } }
ColdStorage will cache the output of the function where the key of the cache will be
argument1.hashCode().toString() + argument2.hashCode().toString()
It is important to note the any object declared as a cache key should have a hashCode implementation
If no cache key is defined for a method, then all the fields of the method will together form the key of the cache for that method.