HTTP 中的“PURGE"方法是否仅从缓存中删除对象? [英] Does the 'PURGE' method in HTTP only removes the object from cache memory?
问题描述
我已经搜索了清除方法,但没有找到任何精确的方法.
I have searched for purge method but didn't found anything precise.
清除是当您从缓存中选取一个对象并丢弃它及其变体.通常清除是通过调用使用 PURGE 方法的 HTTP.HTTP 清除类似于 HTTP GET请求,除了方法是 PURGE.
A purge is what happens when you pick out an object from the cache and discard it along with its variants. Usually a purge is invoked through HTTP with the method PURGE. An HTTP purge is similar to an HTTP GET request, except that the method is PURGE.
这是我发现的.
推荐答案
没错,您可以发送 PURGE 方法从缓存中删除资源.这是一个例子来说明这一点:
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
GET /article/1234 HTTP/1.1
- 资源尚未缓存
- 向 API 发送请求
- 将响应存储在缓存中并返回
GET/article/1234 HTTP/1.1
GET /article/1234 HTTP/1.1
- 资源被缓存
- 从缓存返回响应
PURGE/article/1234 HTTP/1.1
PURGE /article/1234 HTTP/1.1
- API 将 PURGE 方法发送到缓存
- 资源从缓存中移除
GET/article/1234 HTTP/1.1
GET /article/1234 HTTP/1.1
- 资源尚未缓存
- 向 API 发送请求
- 将响应存储在缓存中并返回
这篇关于HTTP 中的“PURGE"方法是否仅从缓存中删除对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!