Problem with CDN Cache Busting

Hey,

I have a serverless function running on netlify than generates images based on query string paramerter values. When the image is generated I want to cache it and serve it. If I make another request with the same values, the CDN should server them image. This seems to be working fine.

The problem is that when I use different query string values, I get the same cached image every time. Do query strings not sidestep the cache?

Are there any ways around this?

Here is an example of two functions that should give me different images…

https://niice-blog.netlify.app/api/board-thumbnail?boardUrl=https://staging.niice.co/api/v2/boards/8c7769bef8cdef0774284842c0876daf
https://niice-blog.netlify.app/api/board-thumbnail?boardUrl=https://staging.niice.co/api/v2/boards/d9a2c65fc84d3475810b80273006ad85

Both are serving me the exact same image.

Any help would be amazing!

hey there,

I am admittedly not the cachebusting expert around here, but we do have some support guides written up on some specifics re: cache - maybe this is helpful?