Page Rules から移行する場合、Page Rules と Cache Rules では動作が異なります。
新しい Cache Rule を作成して Eligible for cache を選ぶと、Cache Everything がデフォルトで有効になります。Page Rules では、Cache Everything を個別に有効にする必要がありました。
Page Rules と同じ動作(Cache Everything を有効にしない)を維持するには、追加のルールを作る前に、次の 2 つのルールをこの順で作成します。
複数の Cache Rule が一致した場合、組み合わせて同じリクエストに適用できます。ルール 1 が一致したあとも、Cloudflare はほかの Cache Rule の一致を評価し続けます。詳細は 順序と優先度 を参照してください。
- ルール名を入力します。例:
bypass everything。 - When incoming requests match で All incoming requests を選択します。
- Then の Cache eligibility で Bypass cache を選択します。

- ルール名を入力します。例:
cache all default cacheable extensions。 - When incoming requests match で Custom filter expression を選択します。
- 次のルールを定義します。
- Field:
File extension - Operator:
is in - Value:
7z, avi, avif, apk, bin, bmp, bz2, class, css, csv, doc, docx, dmg, ejs, eot, eps, exe, flac, gif, gz, ico, iso, jar, jpg, jpeg, js, mid, midi, mkv, mp3, mp4, ogg, otf, pdf, pict, pls, png, ppt, pptx, ps, rar, svg, svgz, swf, tar, tif, tiff, ttf, webm, webp, woff, woff2, xls, xlsx, zip, zst
- Field:
必要なら Edit expression を選び、次の式を貼り付けます。
(http.request.uri.path.extension in {"7z" "avi" "avif" "apk" "bin" "bmp" "bz2" "class" "css" "csv" "doc" "docx" "dmg" "ejs" "eot" "eps" "exe" "flac" "gif" "gz" "ico" "iso" "jar" "jpg" "jpeg" "js" "mid" "midi" "mkv" "mp3" "mp4" "ogg" "otf" "pdf" "pict" "pls" "png" "ppt" "pptx" "ps" "rar" "svg" "svgz" "swf" "tar" "tif" "tiff" "ttf" "webm" "webp" "woff" "woff2" "xls" "xlsx" "zip" "zst"})- Then の Cache eligibility で Eligible for cache を選択します。
