Skip to content

Main content

Cache Age Saturation Formatter

Format a nonnegative exact cache Age integer with RFC delta-seconds overflow saturation at 2^31; does not read response timing.

Loading tool…

Description

Format a nonnegative exact cache Age integer with RFC delta-seconds overflow saturation at 2^31; does not read response timing.

HTTP caches distinguish storage policy, freshness and validation. Age and freshness lifetime are durations in seconds; an entity tag is an opaque validator that can be marked weak. Vary identifies request fields relevant to representation selection. A focused arithmetic or token check alone does not decide whether a stored response may be reused.

Format a nonnegative exact cache Age integer with RFC delta-seconds overflow saturation at 2^31; does not read response timing.

When to use this tool

Use this tool to format a nonnegative exact cache Age integer with RFC delta-seconds overflow saturation at 2^31; does not read response timing.

How to use the tool and how it works

  1. Enter age using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.value, result.saturated. Interpret signs, units, ordering and null values using the rules below.

Parse age as a nonnegative exact decimal integer. Return min(age,2³¹) as decimal text and saturated = age>2³¹.1, 2

Input fieldMeaning and unitsAccepted input
ageNonnegative exact Age integer as decimal text, in seconds.Text, at most 8,192 UTF-16 code units; the stated grammar and narrower limits also apply.
Output fieldInterpretation
resultObject containing the fields below.
result.valueAge value after the explicit cap, as decimal seconds text.
result.saturatedWhether the original exact age exceeded 2^31.
json
{
  "input": {
    "age": "9007199254740993"
  },
  "output": {
    "result": {
      "value": "2147483648",
      "saturated": true
    }
  }
}

Limitations and assumptions

  • At exactly 2³¹ the output is unchanged and saturated is false. This formats an explicit value without measuring response timing.
  • No HTTP exchange, cache store, clock or server is accessed. Header/directive occurrences and timestamps are supplied explicitly. Durations use seconds for HTTP semantics; timestamps must share an origin and unit.
  • Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.

Alternative or Complementary methods

Combine these focused results with the request/response caching rules applicable to the actual exchange. Preserve field occurrences and distinguish freshness calculations, validator comparison and complete cache-reuse authorization.

References

  1. RFC 9111: HTTP Caching — RFC Editor

  2. Tool behavior and example: Cache Age Saturation Formatter — tool.io

Similar or alternative tools

  • Cache Corrected Initial Age

    Compute RFC 9111 corrected initial cache age from explicit same-unit timestamps and Age value; no actual network observation or clock synchronization assumed.

  • Cache Directive Extension Inventory

    Inventory explicit cache directive names outside a caller-provided known-name bank; no hardcoded current registry or automatic extension semantics.