Working out what’s being served from cache and why it’s not working
I have a small website that sees circa 1gb data transfer every month however Cloudflare only appears to be caching a small (40mb) amount. The site is a phpbb based forum but everything has been set up so caching should work but it appears not to.
Is there any way for me to tell what is being requested from my server and if it matches an existing cache request from cloudflare?
I’ve dug through my own logs but can’t see anything out the ordinary that should prevent caching.
Is there a worker I could create to record all hits - almost like a log and to let me know if the requested url has been cached or expired?
I’m on the free plan.
Thanks.
#Workers #bandwidth #log
3 Replies
What are you caching and are you already using workers?
Using cloudflare in the default setup to cache whatever it can. Not using any workers at present.
On Free the easiest way is to look at Dev tools -> Network or use an Extension like Dr.Flare (https://chromewebstore.google.com/detail/drflare/pibckhncbjabhlomohgcdedacopeooml) to see which requests aren't being cached. You can create Cache Rules or Page Rules to cache them, or change the cache-control headers being served from your origin.
Stuff like css/js/images should be cached by default and consume a fair bit of bandwidth, whereas the actual html/document is harder cache right on dynamic websites like forums