Azure CDN - "Ignore query strings" 和 "Bypass caching for query strings" 之间的区别

Azure CDN - difference between "Ignore query strings" and "Bypass caching for query strings"

尽管文档中提到了以下内容,但我不知道“忽略查询字符串”和“绕过查询字符串缓存”在实践中的确切区别。

来自doc

Ignore query strings: Default mode. In this mode, the CDN point-of-presence (POP) node passes the query strings from the requestor to the origin server on the first request and caches the asset. All subsequent requests for the asset that are served from the POP ignore the query strings until the cached asset expires.

Bypass caching for query strings: In this mode, requests with query strings are not cached at the CDN POP node. The POP node retrieves the asset directly from the origin server and passes it to the requestor with each request.

如果我的url是:mydomain.com/articles?page=3。这是否意味着页面查询字符串在这两种情况下都被忽略了。在那种情况下会有什么不同?

忽略查询字符串

第一个请求被转发到源服务器并缓存响应。无论查询字符串是什么,都会从缓存中为以下请求提供服务。

Request1:
Browser (mydomain.com/articles?page=3) -> Azure CDN -> Server (mydomain.com/articles?page=3)

Request2:
Browser (mydomain.com/articles?page=42) -> Azure CDN (from cached whatever the query string)

Request3:
Browser (mydomain.com/otherpage?page=3) -> Azure CDN -> Server (mydomain.com/otherpage?page=3)

绕过查询字符串的缓存

Azure CDN 不缓存具有查询字符串的请求

Request1:
Browser (mydomain.com/articles?page=3) -> Azure CDN -> Server (mydomain.com/articles?page=3)

Request2:
Browser (mydomain.com/articles?page=3) -> Azure CDN -> Server (mydomain.com/articles?page=3)

缓存每个唯一 URL

Request1:
Browser (mydomain.com/articles?page=3) -> Azure CDN -> Server (mydomain.com/articles?page=3)

Request2:
Browser (mydomain.com/articles?page=3) -> Azure CDN (from cache)

Request3:
Browser (mydomain.com/articles?page=42) -> Azure CDN -> Server (mydomain.com/articles?page=42)