SalpXXAPI News
Pitfalls & Selection 3 min read

Can a gateway cache mix up accounts? Test with two accounts before integrating

Public pages and authenticated APIs need different caching policies. Use synthetic data to check identity isolation, permission changes, and error responses before deciding what to cache.

When choosing a gateway, verify that an account-specific response cannot be reused for another account before comparing cache hit rates. Here, caching means storing whole HTTP responses in a browser, reverse proxy, or CDN. It is not model-side prompt caching, which reuses computation. Public documentation and static assets can have their own rules. For usage, billing, and job-status responses, decide separately whether they can be stored, by which layers, and how soon old data must stop being served after an access change. 1

Three directives with different meanings

no-cache does not prohibit storage. It generally requires revalidation with the origin before reuse. private prevents shared caches from storing the whole response, but does not mean a browser cannot store it locally. If compliant HTTP caches should not store a sensitive response, consider no-store on the response and check for proxy overrides. Adding a request header is not a substitute for inspecting the response and testing actual cache behavior. 12

The RFC restricts shared caching of responses to requests with Authorization, but some response directives permit reuse when their conditions are met. Do not assume that this rule automatically covers arbitrary API key headers or cookies. In the acceptance plan, separate the authentication mechanism, the edge cache, and any result cache run by the application. Seeing no-store does not prove the absence of logs, backups, or application-side retention. 1

Test three paths with two accounts

Use two independent accounts and synthetic data in an environment you manage. Give each account an identifiable fixture, such as a different marker on simulated usage or job status. Use the same environment and read endpoint so that moving to a new URL does not accidentally give each request a fresh cache key. Keep only redacted markers, status codes, response headers, and timestamps as evidence—not full credentials. Write down each expected outcome before sending requests.

  1. Identity isolation: Read as A, then B, then repeat in the opposite order. Each account should see only its own marker. If the service specifies an unauthenticated path, check that it does not return the account-specific content just retrieved.
  1. Permission changes: Revoke test-only access and verify the documented behavior from a fresh session. If the docs specify a propagation window, check that the old authorized result is gone once it ends. A fresh session helps separate a stale service response from a UI restoring an old view.
  1. Error isolation: In the test environment, generate a denial and a normal response. Neither should affect the other. Check both that the success is not served to the wrong identity and that one account's denial is not reused for an authorized account.

Headers provide clues, not a verdict

Record Cache-Control, Age, and any documented vendor cache-status header. A missing Age does not prove the origin was contacted. Header values alone likewise cannot establish that responses were never shared across accounts. Pass only when each identity gets the right result, permission changes behave as agreed, and the outcomes reproduce on the route you will actually use. Retest after deploying configuration: a direct-to-origin test can differ from the edge path. 1

Ask the vendor which paths may be cached, who controls the switch, how old entries are purged, and which responses may be reused for a particular identity. If those answers are missing, keep identity-dependent billing or job status out of shared caches. Check the permission boundary before comparing performance.

Sources & attribution

This article references the public materials listed below. Analysis and wording are SalpX's own; quoted material remains the property of its original authors and publishers.

  1. RFC 9111: HTTP Caching — IETF / RFC Editor · accessed 2026-12-04Note:Normative rules for shared caches, authenticated responses, Age, and cache directives.
  2. Cache-Control header — MDN Web Docs · accessed 2026-12-04Note:Explains the differences between no-cache, no-store, and private.

One key for Claude, GPT and 50+ models

The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.