CacheKeyBuilder()
Initializes a new instance of the CacheKeyBuilder class with a default maximal key length of 2048 characters and no key compression.
Declaration
public CacheKeyBuilder()CacheKeyBuilder(int)
Initializes a new instance of the CacheKeyBuilder class and specifies the maximal key length and no key compression.
Declaration
[Obsolete("It is recommended to enable key compression by calling the adequate constructor overload if you significantly increase the key lenght.")]
public CacheKeyBuilder(int maxKeySize)Parameters
| Type | Name | Description |
|---|---|---|
| int | maxKeySize | The maximal number of characters in cache keys before compression. |
CacheKeyBuilder(int, CacheKeyHashingAlgorithm, int)
Initializes a new instance of the CacheKeyBuilder class and specifies the maximal key length and compressing threshold.
Declaration
public CacheKeyBuilder(int maxKeySize, CacheKeyHashingAlgorithm hashingAlgorithm, int keyCompressingThreshold = 0)Parameters
| Type | Name | Description |
|---|---|---|
| int | maxKeySize | The maximal number of characters in cache keys before compression. |
| CacheKeyHashingAlgorithm | hashingAlgorithm | The algorithm used to hash the key if its length is above |
| int | keyCompressingThreshold | The threshold in key length above which the key is compressed by hashing. The default value is 0. |