Skip to content

Commit

Permalink
cached query analysis in querysharding pkg
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Kumar Jha <[email protected]>
  • Loading branch information
Rahulkumar2002 committed Oct 12, 2022
1 parent a517125 commit 08674cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/querysharding/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func (a *CachedQueryAnalyzer) Analyze(query string) (QueryAnalysis, error) {
}
}

// Analyze if needed
// Analyze if needed.
analysis, err := a.analyzer.Analyze(query)

// Adding to cache
// Adding to cache.
_ = a.cache.Add(query, cachedValue{QueryAnalysis: analysis, err: err})

return analysis, err
Expand Down

0 comments on commit 08674cc

Please sign in to comment.