This will probably be obvious for sysadmins/devops people, but for ordinary folks like me
was an interesting experience powered by claude.ai, enough that I decided to write a
new post for the first time in years.
I have a hobby project, an Android card game Belot, that makes a single HTTP request at startup to https://middlehut.com/android-belot-config.json. It fetches a static remote configuration, which tells the game which is the most recently released version, so that it can invite players to update to latest. The middlehut.com site is on shared hosting and is just a simple informational site related to the game. Because many people play the game, there are many requests for this small JSON file every day. The file itself barely changes a few times per year, and its freshness is not so important.
The site is behind cloudflare.com and while I’ve always assumed cloudflare does some caching automatically, it turns out this is not the case, especially for JSON resources. A small talk with the Claude bot guided me to setup Cloudflare caching for that resource, which decreases the requests to the shared hosting company to almost zero, and also reduces the latency a bit, because otherwise all these requests are proxied through cloudflare to the backend server of the site.
For details on how to setup caching best ask an AI chatbot. The gains could be substantial if the app has many users and hence makes many of these requests.
Caching->Cache Rules->Create Rule and fill the details for the specific request.