Skip to content

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

Open
krowvin wants to merge 1 commit intodevelopfrom
swagger-cache-buster
Open

Change CB (cache buster) to use 'cache' from the request#1684
krowvin wants to merge 1 commit intodevelopfrom
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
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.

1 participant