IdCacheResolver

fun IdCacheResolver(idArguments: List<String> = listOf("id", "ids"), keyScope: CacheKey.Scope = CacheKey.Scope.TYPE): CacheResolver

A CacheResolver that uses the id/ids argument, if present, to compute the cache key. The name of the id arguments can be provided (by default "id" and "ids"). If several names are provided, the first present one is used. Only one level of list is supported - implement CacheResolver if you need arbitrary nested lists of objects.

Parameters

idArguments

possible names of the argument containing the id for objects

keyScope

the scope of the computed cache keys. Use CacheKey.Scope.TYPE to namespace the keys by the schema type name, or CacheKey.Scope.SERVICE if the ids are unique across the whole service.

See also