That's correct, you can send the PURGE method to remove a resource from the cache. This is a example to illustrate this:
GET /article/1234 HTTP/1.1
- The resource is not cached yet
- Send request to the API
- Store response in cache and return
GET /article/1234 HTTP/1.1
- The resource is cached
- Return response from cache
PURGE /article/1234 HTTP/1.1
- API sends PURGE method to the cache
- The resources is removed from the cache
GET /article/1234 HTTP/1.1
- The resource is not cached yet
- Send request to the API
- Store response in cache and return
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…