Open sandboxFocus

Constructor CacheKeyBuilder

CacheKeyBuilder()

Initializes a new CacheKeyBuilder with a default maximal key lenght of 2048 characters and no key compression.

Declaration
public CacheKeyBuilder()

CacheKeyBuilder(int)

Initializes a new CacheKeyBuilder and specifies the maximal key lenght 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 CacheKeyBuilder and specifies the maximal key lenght 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 keyCompressingThreshold.

int keyCompressingThreshold

The threshold in key lenght above which the key is compressed by hashing. The default value is 0.