Caching and logging
You can improve performance and scalability of a web service by implementing caching. You can simplify troubleshooting a web service by enabling logging.
Caching HTTP responses for web services
Response aka HTTP caching is tied to HTTP GET
requests and responses because it is based on HTTP headers. Therefore, it only works with websites and web services that use HTTP as their transport technology, like web services built using controller-based Web APIs and OData.
More Information: You can read the official standard for HTTP caching at the following link: https://www.rfc-editor.org/rfc/rfc9111
Requirements for HTTP aka response caching include the following:
- The request must be a
GET
orHEAD
one.POST
,PUT
, andDELETE
requests, and so on, are never cached by HTTP caching. - The response must have a
200 OK
status code. - If the request has an
Authorization
header, then the response is not cached. When a user is logged in to a website, their requests will have anAuthorization...