janiussyafiq commented on PR #13632: URL: https://github.com/apache/apisix/pull/13632#issuecomment-4850731313
> One compatibility concern: this PR changes the existing exact-cache hit header from `X-AI-Cache-Status: HIT` to `X-AI-Cache-Status: HIT-L1`, even when the semantic layer is not enabled. > > The `-L1` suffix also feels a bit odd as a user-facing status, and this may break existing clients, tests, dashboards, or log parsing that already check for `HIT`. Could we keep the exact-cache status as `HIT` for backward compatibility, and only use a distinct value such as `HIT-L2` when the semantic layer serves the response? Another option would be to add a separate cache-layer header if we need to expose the serving layer explicitly. @membphis The initial plan was to keep using `HIT` for both cases (L1 and L2). However, I realized that it is easier for debugging (for testing) and improve readability so we can exactly know which layer was getting hit. One thing to note is that special case for L2, a unique header will appear upon hit, `X-AI-Cache-Similarity` in comparison to L1. To answer your concern about breaking existing clients, tests, etc, since the current ai-cache version hasn't been released hence I think it is safe for the current change. WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
