Skip to content

Commit 3f48e37

Browse files
authored
fix: avoid double counting cache hits (#177)
Signed-off-by: cryo <[email protected]>
1 parent aa6c22f commit 3f48e37

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/semantic-router/pkg/extproc/request_handler.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ func (r *OpenAIRouter) handleCaching(ctx *RequestContext) (*ext_proc.ProcessingR
263263
if err != nil {
264264
observability.Errorf("Error searching cache: %v", err)
265265
} else if found {
266-
// Record and log cache hit
267-
metrics.RecordCacheHit()
266+
// Log cache hit
268267
observability.LogEvent("cache_hit", map[string]interface{}{
269268
"request_id": ctx.RequestID,
270269
"model": requestModel,

0 commit comments

Comments
 (0)