Method SetKeyEncoder
SetKeyEncoder(KeyEncoder<TKey>)
Sets the class used by the cache for encoding keys.
public CacheBuilder<TKey, TValue> SetKeyEncoder(KeyEncoder<TKey> keyEncoder)
Parameters
keyEncoder
KeyEncoder<TKey>An encoder derived from KeyEncoder<T>.
Returns
- CacheBuilder<TKey, TValue>
A builder object that can be used to further configure the cache.
Remarks
When building a cache that uses arbitrary-length string keys, a call to this method overrides
any call to SetKeystringCacheSize(int) on the builder.
It becomes the responsibility of the supplied keyEncoder
to be
constructed with the desired keystring cache size.
- See Also