appcachepoison.py 文件源码

python
阅读 42 收藏 0 点赞 0 评论 0

项目:piSociEty 作者: paranoidninja 项目源码 文件源码
def cacheForFuture(self, headers):
        ten_years = 315569260
        headers.setRawHeaders("Cache-Control",["max-age={}".format(ten_years)])
        headers.setRawHeaders("Last-Modified",["Mon, 29 Jun 1998 02:28:12 GMT"]) # it was modifed long ago, so is most likely fresh
        in_ten_years = date.fromtimestamp(time.time() + ten_years)
        headers.setRawHeaders("Expires",[in_ten_years.strftime("%a, %d %b %Y %H:%M:%S GMT")])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号