express eTag 模块是干什么的了,没读懂
发布于 9 年前 作者 slclub 6551 次预览 最后一次回复是 9 年前 来自 问答
这个模块主要干什么的; 以及怎么工作的 求大神解析
etag(entity, [options])
Generate a strong ETag for the given entity. This should be the complete body of the entity. Strings, Buffers, and fs.Stats are accepted. By default, a strong ETag is generated except for fs.Stats, which will generate a weak ETag (this can be overwritten by options.weak).
res.setHeader(‘ETag’, etag(body))
5 回复
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
去搜一下alsotang的一篇缓存的文章
@i5ting @htoooth 非常感谢,
https://cnodejs.org/topic/55210d88c4f5240812f55408 已经收藏
RFC 7232