V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
FRHong
V2EX  ›  Project Babel

更新背景 - 想请教一下是否有延时

  •  
  •   FRHong · 2010-12-20 01:22:16 +08:00 · 2870 次点击
    这是一个创建于 4869 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚刚想换一张背景,于是把原来的 bg.png 更新之后 deploy 上去。可是不知道为什么其它文件都更新了,就是这个 bg.png 没有更新。无论怎么 F5 都更新不了。

    我看了根目录的 css.py 这个文件。不知道是不是跟下面这段有关?


    class CSSHandler(webapp.RequestHandler):
    def get(self, theme):
    template_values = {}
    themes = os.listdir(os.path.join(os.path.dirname(__file__), 'tpl', 'themes'))
    if theme in themes:
    path = os.path.join(os.path.dirname(__file__), 'tpl', 'themes', theme, 'style.css')
    else:
    path = os.path.join(os.path.dirname(__file__), 'tpl', 'themes', 'default', 'style.css')
    output = template.render(path, template_values)
    expires_date = datetime.datetime.utcnow() + datetime.timedelta(days=7)
    expires_str = expires_date.strftime("%d %b %Y %H:%M:%S GMT")
    self.response.headers.add_header("Expires", expires_str)
    self.response.headers['Cache-Control'] = 'max-age=120, must-revalidate'
    self.response.headers['Content-type'] = 'text/css;charset=UTF-8'
    self.response.out.write(output)

    ===
    谢谢!
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1414 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:24 · PVG 01:24 · LAX 10:24 · JFK 13:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.