Skip to content

[log] Add cache hit and creation debug logging to filteredServerCache#5440

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
log/routed-cache-logging-543bbb83c6e9891b
Draft

[log] Add cache hit and creation debug logging to filteredServerCache#5440
github-actions[bot] wants to merge 1 commit intomainfrom
log/routed-cache-logging-543bbb83c6e9891b

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Adds two targeted debug log calls to internal/server/routed.go:

  1. newFilteredServerCache — logs the TTL and max-size at cache creation time, useful for verifying session timeout configuration at a glance.
  2. getOrCreate — logs a [CACHE] Cache hit line when a cached server entry is reused, complementing the existing miss/eviction log lines.

Changes

  • internal/server/routed.go: +2 logRouted.Printf calls using the existing logRouted logger (server:routed).

Motivation

The existing cache logging covered eviction paths (TTL expiry and LRU eviction) but not cache hits or initial cache creation. This gap made it harder to distinguish between cache warm-up and steady-state operation when debugging session handling under load.

Validation

  • go build ./... — passes
  • go test ./internal/server/... — passes

Generated by Go Logger Enhancement · ● 7.4M ·

Log cache creation parameters and cache hits to aid debugging of
session-scoped filtered server lifecycle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants