Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【システム】Cloudflareに公開側トップページもキャッシュされないようになっている #4121

Open
fuchigam1 opened this issue Feb 7, 2025 · 2 comments
Labels
Adjusting 調整中 Ver5.0 バージョン5.0

Comments

@fuchigam1
Copy link
Collaborator

fuchigam1 commented Feb 7, 2025

概要

Cache-Controlヘッダーが、Cloudflareにトップページも配下もすべてキャッシュされない no-store 指定になっています。

管理画面、フォーム、管理画面ログイン時のフロント表示のみキャッシュしないように、
Cache-Control の指定を no-cache,no-store と調整し、公開側の no-store 指定をなくすことを提案します。
no-store があると、Cloudflare側でキャッシュしません。

baserCMS version : 5.1.5

Image

備考

併せて4系の現状と調整の理想を挙げます。

対象 現状 調整の理想
トップページ no-cache no-cache
メールフォーム no-cache no-cache, no-store
管理画面 no-cache no-cache, no-store
管理画面ログイン時のフロント表示 no-cache no-cache, no-store
@fuchigam1 fuchigam1 added the Ver5.0 バージョン5.0 label Feb 7, 2025
@ryuring
Copy link
Collaborator

ryuring commented Feb 9, 2025

@kaburk @uchin0 こちらの件、意見を頂いてもいいですか?

@ryuring ryuring added the Adjusting 調整中 label Feb 9, 2025
@uchin0
Copy link
Contributor

uchin0 commented Feb 9, 2025

@ryuring
Issueに記載の通りトップページ配下がno-storeになっている状況は解消したいです。

トップページ配下でno-cacheを指定するかどうかについては、
no-cacheが指定されている場合、リソースが更新されていないかオリジンサーバへ問い合わせを行うようなので、CDNを利用したサーバー負荷の低減を狙うのであれば、以下のように設定してもよいかと思います。
Cache-Control: public, max-age=3600, s-maxage=3600

max-ageについては設定で変更できるようにすることも検討したいです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adjusting 調整中 Ver5.0 バージョン5.0
Projects
None yet
Development

No branches or pull requests

3 participants