mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-25 13:10:46 +08:00
fix: do not cache error result
This commit is contained in:
@@ -150,7 +150,7 @@ func Search(indexer *ent.Indexers, keyWord string) ([]Result, error) {
|
||||
log.Debugf("not found in cache, need query again: %v", key)
|
||||
res, err := doRequest(req)
|
||||
if err != nil {
|
||||
cc.Set(key, nil)
|
||||
//cc.Set(key, nil)
|
||||
return nil, errors.Wrap(err, "do http request")
|
||||
}
|
||||
cacheRes = res.ToResults(indexer)
|
||||
|
||||
Reference in New Issue
Block a user