Skip to content

KV Cache: fresh install shows "No LMCache KV cache detected" until the first scan runs #591

Open

Description

@KIvanow

Found while testing master (0e6d357) locally with LMCache keys already in the instance.

What happens
On the first visit after the API starts, the KV Cache page shows "No LMCache KV cache detected", even though the instance holds LMCache chunks. After Rescan now, or once the next scheduled scan runs, the page shows the real data.

Why

  1. KvCacheGuard shows KvCacheNotDetected whenever kvCacheInUse(status.data) is false. That includes the case where no scan has completed yet, so "not scanned yet" and "scanned, nothing found" look the same.
  2. The first footprint poll runs before license validation finishes. KvCacheFootprintService.pollConnection returns early when !this.license.hasFeature(Feature.KV_CACHE_MONITORING), so that first scan is skipped. The next one comes KV_CACHE_FOOTPRINT_INTERVAL_MS later (5 minutes by default).

Result: a new Pro user who opens the page right after setup is told for up to 5 minutes that LMCache isn't there.

Suggested fix

  • Web: when no scan has completed for the connection, show a "Scanningâ€Ķ" state instead of the not-detected card.
  • API: run a scan as soon as the license resolves to a tier with KV_CACHE_MONITORING, or retry the skipped first poll shortly after, instead of waiting a full interval.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions