| TestNew | Basic middleware creation with max-age | Sets Cache-Control header with max-age=3600 for 1 hour duration |
| TestWithOptions - public with max-age | Public cache with max-age | Contains “public” and “max-age=3600” directives |
| TestWithOptions - private with max-age | Private cache with max-age | Contains “private” and “max-age=300” directives |
| TestWithOptions - no-cache | No-cache directive | Contains “no-cache” directive |
| TestWithOptions - no-store | No-store directive | Contains “no-store” directive |
| TestWithOptions - must-revalidate | Must-revalidate with max-age | Contains “must-revalidate” and “max-age=3600” directives |
| TestWithOptions - immutable | Immutable content | Contains “public” and “immutable” directives |
| TestWithOptions - s-maxage | Shared cache max-age | Contains “max-age=3600” and “s-maxage=7200” directives |
| TestWithOptions - stale-while-revalidate | Stale-while-revalidate pattern | Contains “max-age=3600” and “stale-while-revalidate=1800” directives |
| TestPublic | Public cache helper function | Cache-Control header contains “public” directive |
| TestPrivate | Private cache helper function | Cache-Control header contains “private” directive |
| TestImmutable | Immutable cache helper function | Cache-Control header contains “immutable” directive |
| TestStatic | Static assets cache helper function | Cache-Control header contains “public” and “immutable” directives |
| TestSWR | Stale-while-revalidate helper function | Cache-Control header contains “stale-while-revalidate=1800” directive |
| TestWithOptions_DoesNotOverride | Existing Cache-Control header preservation | Middleware does not override pre-existing Cache-Control headers |
| TestWithOptions_Empty | Empty options handling | Defaults to “no-cache” when no options are provided |