MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ClearSignatureCache

Function ClearSignatureCache

internal/cache/signature_cache.go:239–249  ·  view source on GitHub ↗

ClearSignatureCache clears signature cache for a specific model group or all groups.

(modelName string)

Source from the content-addressed store, hash-verified

237
238// ClearSignatureCache clears signature cache for a specific model group or all groups.
239func ClearSignatureCache(modelName string) {
240 if modelName == "" {
241 signatureCache.Range(func(key, _ any) bool {
242 signatureCache.Delete(key)
243 return true
244 })
245 return
246 }
247 groupKey := GetModelGroup(modelName)
248 signatureCache.Delete(groupKey)
249}
250
251// DeleteCachedSignatureRequired removes one exact cached signature.
252func DeleteCachedSignatureRequired(ctx context.Context, modelName, text string) error {

Calls 2

GetModelGroupFunction · 0.85
DeleteMethod · 0.65