Cache issue with specific URL | Always get cf-cache-status BYPASS

Dear Cloudflare Users,

I am writing to report an issue I am experiencing with the cache settings on my website.

I have set the cache rule to cache everything

, but this URL keeps returning bypass:
https://aflam.vip/move_subtitle/api/search/?imdb_id=55923

Could you please look into this issue and advise me on how to resolve it?


▶GET https://aflam.vip/move_subtitle/api/search/?imdb_id=559232001923 ms

* ▶Network

1. ▶addresses: {…}

2. ▶tls: {…}

▶Request Headers

User-Agent: PostmanRuntime/7.31.3

Accept: */*

Host: aflam.vip

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

▶Response Headers

Date: Tue, 21 Mar 2023 12:58:38 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

access-control-allow-origin: *

access-control-allow-methods: GET, PUT, POST, DELETE, OPTIONS

Cache-Control: no-cache, private

x-ratelimit-limit: 60

x-ratelimit-remaining: 59

vary: Accept-Encoding

strict-transport-security: max-age=31536000; includeSubDomains; preload

CF-Cache-Status: BYPASS

Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=5KptA78qrCopVbpLlaQM3dK1DMeD7QyASBn3L7ecoTMBXkpxA18%2B3n5ZPnJ4W7IIXT1zNhiPBAb76k9VXeQfzCRhnFSzs%2FeZA4QAX18y%2BodtVfDZw0uaKN4XHQk%3D"}],"group":"cf-nel","max_age":604800}

NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}

Server: cloudflare

CF-RAY: 7ab65e0dceca11ae-MRS

Content-Encoding: br

alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

Moreover, if the URL returns a 404 status error, Cloudflare cache the error page… how can I only cache 200 status?

Thank you for your assistance.

Best regards,

Hi,

There are a few reasons why Cloudflare cache won’t cache a page even with a Cache-Everything Page Rule. Among them, a Cache-Control header with instructions not to cache the page. In your case,

You can fix this either by setting a different Cache-Control header at your origin, or by adding an Edge Cache TTL setting to the Cache-Everything Page Rule.

As for the 404, as the name implies, with your Page Rule, Cloudflare will cache everything, including redirects and error results.

You should consider moving to the much more flexible Cache Rule (Beta), where you can set specific TTLs for each HTTP status code.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.