Skip to content

Change CB (cache buster) to use 'cache' from the request#1684

Merged
krowvin merged 1 commit into
developfrom
swagger-cache-buster
Apr 21, 2026
Merged

Change CB (cache buster) to use 'cache' from the request#1684
krowvin merged 1 commit into
developfrom
swagger-cache-buster

Conversation

@krowvin
Copy link
Copy Markdown
Collaborator

@krowvin krowvin commented Apr 9, 2026

There was some confusion on the swagger URL builder to what cb was.

This will remove the request to cache and bring the URL back to what it was before.

req.cache sets the browser cache, more on mdn's Request cache docs

headers[...etc] will keep the proxy/down the wire data sniffers in line with caching. (edge cache)

I did some testing on localhost by

  1. Clicking execute in the swagger page to see each request NOT cache
  2. fetch("http://localhost:8081/cwms-data/location/category") in the browser console to see the requests cache
  3. Repeating 1. after 2 to see no-cache was working
  4. fetch("http://localhost:8081/cwms-data/location/category", {cache: "no-cache"}) to mimic what swagger now does and confirming no "disk cache" in the network tab

@krowvin krowvin requested a review from MikeNeilson April 9, 2026 12:50
@krowvin krowvin merged commit f785d4e into develop Apr 21, 2026
9 of 10 checks passed
@krowvin krowvin deleted the swagger-cache-buster branch April 21, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants