Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
デフォルトでは、Tornado はCache-Control: public、StaticFileHandler. これをどのように変更できCache-Control: no-cacheますか?
Cache-Control: public
StaticFileHandler
Cache-Control: no-cache
tornado/web.py を見ると、最も簡単な方法は StaticFileHandler をサブクラス化し、set_extra_headers メソッドをオーバーライドすることです。
def set_extra_headers(self, path): self.set_header("Cache-control", "no-cache")