HTTP Vary: Match the Report Representation Before Reusing Cached Data
The same report URL can return different representations. Inspect Vary and the original selecting request headers before reusing a cached response in an industrial integration.

Key takeaway: Matching the URL alone may not establish that a cached representation fits the next request.
1. Record the selecting fields
The Vary response field identifies request fields that might have influenced representation selection, beyond the method and target URI. A response can therefore require more context than a matching URL when a cache evaluates reuse. Retain the selecting request headers with the cached representation.
For example, Accept-Language or Accept-Encoding can affect the chosen representation. Do not assume that all deployments vary on these fields, or that these are the only possible selectors. Inspect the actual response and interface contract rather than copying a cache key from an unrelated service.
2. Separate identity from freshness
A representation that matches the request context can still be too old for the application. Keep its acquisition time, cache directives and validation evidence alongside its identity. Conversely, recently received content can be the wrong representation if a cache ignores a selecting field.
A hypothetical reporting client asks for an English representation after a previous request obtained another language at the same URL. Reusing by URL alone can deliver the wrong representation even though the transport worked. This is a protocol illustration, not a claim about a particular ProSight Software report option.

3. Respect the boundary of Vary
Vary is not a permission mechanism and does not replace authentication or cache restrictions for sensitive information. Do not introduce cross-user reuse as a performance shortcut. Confirm the library's handling of absent headers, normalised field values and validation against the origin service.
A wildcard Vary value requires special care: it does not provide a simple finite list of header values that the client can compare locally to establish suitability. Follow the applicable HTTP caching rules and library support. Do not invent a cache bypass that weakens access or freshness requirements.
4. Build a discriminating cache test
Prepare two requests to the same target that differ in one documented selecting field. Give the responses distinguishable content and record what the cache stores and returns. Test a match, a mismatch and an origin-validated reuse case where supported, using an isolated fixture.
Acceptance should describe both the selected representation and the time-validity rule. Record where the cache sits, including any intermediary, because application code may never see the original origin response. A faster screen refresh is not sufficient evidence that the correct industrial record was served.
Practical acceptance checklist
Save Vary and the selecting request values.
Check representation matching separately from freshness.
Keep access restrictions independent of the cache key.
Test one changed selector with distinguishable response content.
Recommended equipment / related solutions
Use the platform overview to frame the monitoring requirement, then discuss an application-specific integration through ProSight Custom. Confirm the supported interface, version, limits and deliverables for the actual deployment; these protocol examples do not promise a feature on every installation.
Practical FAQ
Does Vary mean cached content is current?
No. Selection matching, freshness, validation and access restrictions must each be considered.
Need help with your application?
Share the application, device or interface documentation, sanitised diagnostic evidence and required outcome so ProSense can assess the next step.



.png)
Comments