express eTag 模块是干什么的了,没读懂
发布于 1 年前 作者 slclub 1517 次浏览 来自 问答

etag源码地址

这个模块主要干什么的; 以及怎么工作的 求大神解析

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))

回到顶部