mazipan / pramuka-id

🌴 Kumpulan informasi digital mengenai berbagai materi pramuka, materi kenegaraan dan materi kecakapan umum
https://pramuka-id.vercel.app/
MIT License
98 stars 32 forks source link

feat: Add Vercel Cache config #68

Closed adylanrff closed 4 years ago

adylanrff commented 4 years ago

Add vercel.json config to the root project directory. Currently it only contains the Header Currently I use 86400 for the max-age.

Please review 🙏 ps: This is my first Vercel related PR, inputs are very welcomed

vercel[bot] commented 4 years ago

@adylanrff is attempting to deploy a commit to a Personal Account owned by Irfan Maulana on Vercel.

@mazipan first needs to authorize it.

adylanrff commented 4 years ago

Hi @mazipan can you authorize the deployment for this PR? As per this documentation, I want to see from the X-Vercel-Cache whether it is working well or not

image

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mazipan/buku-saku-pramuka/1y0ebq0km
✅ Preview: https://buku-saku-pramuka-git-feat-adylanvercel-cache-config.mazipan.vercel.app

mazipan commented 4 years ago

Let me know when you finish the testing ya

adylanrff commented 4 years ago

image

Apparently the cache seems to always miss. I need to dive deeper into this. (Or is there any mechanism that I dont know of?)

mazipan commented 4 years ago

How about Cache-Control header? Can you see it? @adylanrff

https://vercel.com/docs/configuration#project/headers

adylanrff commented 4 years ago

How about Cache-Control header? Can you see it? @adylanrff

https://vercel.com/docs/configuration#project/headers

Yes, I could, but it shows max_age=0 which means the config apparently does not override the default one.

mazipan commented 4 years ago

I already check using https://httpstatus.io/

Screenshot_20201019-191313_Chrome