ApiAxle supports caching. The following details the flow and you can take a peek at the relevant source code if that’s more your thing.
You can optionally set a cache time (in seconds) on a per-api basis by passing an option to the provisioning script:
./bin/new-api.coffee --global-cache=20 --end-point=graph.facebook.com facebook
This will give every endpoint of the
Axle supports the following pragmas of the cache-control spec:
Setting s-maxage will make ApiAxle cache your call for as many seconds as you pass. This overrides the global cache and can be overridden by the
Setting this pragma will force Axle to make the backend HTTP call before caching it again for the amount of time specified by the global cache or
Don’t cache the call being made. Overrides the global cache and
- The HTTP status code.
- The body of the call.
For which verbs?
Only GETs are cached (probably HEADs in the future).