Do we have any guidelines or best practices for caching mobile API calls?
Thanks in advance.
For the gaming community I recommend breaking mobile requests into action calls (login, profile, game start, etc.), and info calls (leaderboards, news feeds, etc). The info calls we can cache, whereas the action calls we usually cannot cache. This usually helps offload up to half of the API calls, maybe more.
I imagine this can be applied to any mobile app, but as always, YMMV.
API prioritization cloudlet might want to be considered for API calls that can't be cached.
API Prioritization | Cloudlets & Micro Applications | Akamai
Mobile API calls are not very different from any API calls. You can cache calls based on usage.
For e.g. You can enable POST caching if your API uses POST to display common data.
If you have dynamic Keys like "Tokens" within your call used to authenticate then you have a problem because caching wont be an options.
Idea is to make your Mobile API more friendly to Caching and normalized like HTTP responses.
Few things without knowing a sample of your API calls.
You can use Gzip or Last Mile Compression.
Base64 encode images and binary data and let Gzip compression do its work.
use POST caching and GET Caching to offload API calls.
use "make Public early" for streaming API calls.
There are neat tricks to make FEO/Image compression work over mobile api calls as well.
Enable Sureroute, you can use a static HTML file on your API origin that doesn't execute code and is set to no-cache.
DO NOT cache or modify any tracking systems like urban airship.
I could suggest more if you had a sample of API calls for me to refer to.
Retrieving data ...