MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / CleanMatchKey

Method CleanMatchKey

internal/caches/list_file_sqlite.go:206–223  ·  view source on GitHub ↗

CleanMatchKey 清理通配符匹配的缓存数据,类似于 https://*.example.com/hello

(key string)

Source from the content-addressed store, hash-verified

204
205// CleanMatchKey 清理通配符匹配的缓存数据,类似于 https://*.example.com/hello
206func (this *SQLiteFileList) CleanMatchKey(key string) error {
207 if len(key) == 0 {
208 return nil
209 }
210
211 defer func() {
212 // TODO 需要优化
213 this.memoryCache.Clean()
214 }()
215
216 for _, db := range this.dbList {
217 err := db.CleanMatchKey(key)
218 if err != nil {
219 return err
220 }
221 }
222 return nil
223}
224
225// CleanMatchPrefix 清理通配符匹配的缓存数据,类似于 https://*.example.com/prefix/
226func (this *SQLiteFileList) CleanMatchPrefix(prefix string) error {

Callers

nothing calls this directly

Calls 2

CleanMatchKeyMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected