HTTP中的"PURGE"方法是否仅从高速缓存中删除对象? [英] Does the 'PURGE' method in HTTP only removes the object from cache memory?

查看:64
本文介绍了HTTP中的"PURGE"方法是否仅从高速缓存中删除对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了清除方法,但没有发现任何精确的方法.

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:

获取/article/1234 HTTP/1.1

GET /article/1234 HTTP/1.1

  • 该资源尚未缓存
  • 发送请求到API
  • 将响应存储在缓存中并返回

获取/article/1234 HTTP/1.1

GET /article/1234 HTTP/1.1

  • 资源已缓存
  • 从缓存返回响应

清除/article/1234 HTTP/1.1

PURGE /article/1234 HTTP/1.1

  • API将PURGE方法发送到缓存
  • 资源已从缓存中删除

获取/article/1234 HTTP/1.1

GET /article/1234 HTTP/1.1

  • 该资源尚未缓存
  • 发送请求到API
  • 将响应存储在缓存中并返回

这篇关于HTTP中的"PURGE"方法是否仅从高速缓存中删除对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆