One of the magical aspects of HTTP is its use of different properties to trigger actions. The HTTP method provides a descriptive way to trigger a response. There are a variety of possible HTTP methods, with PUT, GET, POST, and DELETE being the most common methods.
Those methods correspond to create, retrieve, update, and delete (CRUD) actions. Cache is a powerful tool to make your application respond faster, but not all responses should be cached. The HTTP method can be a primary signal to trigger an appropriate caching strategy.
The first two applications, 2048 and Podstr, use only GET requests. The PWA ticket application utilizes POST methods, which should not be cached. When a user registers, buys a ticket, updates their profile, or submits a contact request, a POST request is made to the API.
The API response is typically...