These are chat archives for cherrypy/cherrypy

5th
Oct 2018
Sviatoslav Sydorenko
@webknjaz
Oct 05 2018 08:36
@jeffvanvoorst I've fixed that. Feel free to rebase your branch on top of current master
Sviatoslav Sydorenko
@webknjaz
Oct 05 2018 12:10
@jaraco I've replaced setup.py with a shim to support declarative config in cheroot. Feel free to check it out and maybe we could port that to your skeleton
Giancarlos
@Giancarlos
Oct 05 2018 13:45
is there anyone here who can provide documentation on how to set a no-cache header on all static files?
Sviatoslav Sydorenko
@webknjaz
Oct 05 2018 16:29
That probably depends on your stack+config
Giancarlos
@Giancarlos
Oct 05 2018 17:32
running CherryPy 15.0.0
conf = {
        '/documentation': {
            'tools.staticdir.on': True,
            'tools.staticdir.dir': '/var/www/diip/web/documentation',
        }
}
roughly what it looks like atm (my attempt)
I've tried tools.expire and tools.caching, hard to figure out what each one's really for not sure where they're documented
we're serving everything through cherrypy, not apache or any other web server
any help or suggestions is greatly appreciated :)
Sviatoslav Sydorenko
@webknjaz
Oct 05 2018 20:02
Cache-Control: no-cache is what HTTP client sends, if you use tools.caching it supports reacting to it: https://github.com/cherrypy/cherrypy/blob/master/cherrypy/lib/caching.py#L314-L341
tools.expires influences expiration https://github.com/cherrypy/cherrypy/blob/master/cherrypy/lib/caching.py#L423-L446