SqlColumnEncryptionKeyStoreProvider.ColumnEncryptionKeyCacheTtl Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the lifespan of the decrypted column encryption key in the cache. Once the timespan has elapsed, the decrypted column encryption key is discarded and must be revalidated.
public:
virtual property Nullable<TimeSpan> ColumnEncryptionKeyCacheTtl { Nullable<TimeSpan> get(); void set(Nullable<TimeSpan> value); };
public virtual TimeSpan? ColumnEncryptionKeyCacheTtl { get; set; }
member this.ColumnEncryptionKeyCacheTtl : Nullable<TimeSpan> with get, set
Public Overridable Property ColumnEncryptionKeyCacheTtl As Nullable(Of TimeSpan)
Property Value
Remarks
Internally, there is a cache of column encryption keys (once they are decrypted). This is useful for rapidly decrypting multiple data values. The default value is 2 hours. Setting this value to zero disables caching.
The column encryption keys decrypted by custom key store providers registered on a connection or command instance will not be cached. Custom key store providers should implement their own caching mechanism.
Caching implemented by custom key store providers will be disabled by the driver if the key store provider instance is registered using RegisterColumnEncryptionKeyStoreProviders(IDictionary<String,SqlColumnEncryptionKeyStoreProvider>). Any caching implementation should reference the value of this property before caching a column encryption key and not cache it if the value is zero. This will avoid duplicate caching and possible user confusion when they are trying to configure key caching.