Method SetKeystringCacheSize
SetKeystringCacheSize(int)
Sets this size of the internal keystring cache for caches that use System.String
as the TKey
type parameter.
public CacheBuilder<TKey, TValue> SetKeystringCacheSize(int keystringCacheSize)
Parameters
keystringCacheSize
intNumber of string key items to hold in the internal cache.
Returns
- CacheBuilder<TKey, TValue>
A builder object that can be used to further configure the cache.
Remarks
The internal cache of key strings does not typically affect the performance of ordinary CRUD-style client applications--the default of 10,000 is sufficient for most use cases.
Consider using a large keystringCacheSize
in PMI invocation handler applications or other applications that process
a high number of events from the ServiceEvents class.
A keystring cache that is
large enough to hold all object keys involved in repeated Invoke operations
will reduce round trips to the ScaleOut service.
Applications that perform query operations that return large numbers of string keys may also benefit from a large keystring cache.
Note that a call to SetKeyEncoder(KeyEncoder<TKey>) will override a call to this method.