CleanMatchKey 清理通配符匹配的缓存数据,类似于 https://*.example.com/hello
(key string)
| 204 | |
| 205 | // CleanMatchKey 清理通配符匹配的缓存数据,类似于 https://*.example.com/hello |
| 206 | func (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/ |
| 226 | func (this *SQLiteFileList) CleanMatchPrefix(prefix string) error { |
nothing calls this directly
no test coverage detected