语言

DistributedCachingEmbeddingGenerator<TInput,TEmbedding>.GetCacheKey 方法

定义

计算指定值的缓存键。

protected:
 override System::String ^ GetCacheKey(ReadOnlySpan<System::Object ^> values);
protected override string GetCacheKey(scoped ReadOnlySpan<object?> values);
override this.GetCacheKey : ReadOnlySpan<obj> -> string
Protected Overrides Function GetCacheKey (values As ReadOnlySpan(Of Object)) As String

参数

values
ReadOnlySpan<Object>

要通知键的值。

返回

计算密钥。

注解

将 values 序列化为 JSON JsonSerializerOptions ,以便计算密钥。

生成的缓存密钥不能保证在库的各版本中保持稳定。

适用于