caching max-age for static resources that contains "?"

Hello Community,
Is it a bad idea to cache (max-age) static resources that contain a query “?..” in the URL?

Thanks in advance.


No. It’s ok and a good way to manage different versions of the same file.
But keep in mind that some proxies don’t cache items with query string.

Our CDN is showing that the static file that contains the “?” is a X-HIT, so I think we are good.
Thanks for the advice.