public
Description: A cross-platform web server that's scripted with Nu.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nunja.git
Set caching for static files.
timburks (author)
Thu May 08 20:48:27 -0700 2008
commit  ce659aa8fae6d50c53f4490f616a8c9603dd530e
tree    a2b039e35446c25032f87953bb3bbad08974c35b
parent  d20db0609e3e5a3ebf02be8290966718cfc8c9aa
...
217
218
219
 
220
221
222
...
217
218
219
220
221
222
223
0
@@ -217,6 +217,7 @@
0
                       (then
0
                            (set data (NSData dataWithContentsOfFile:filename))
0
                            (request setValue:(mime-type filename) forResponseHeader:"Content-Type")
0
+ (request setValue:"max-age=3600, must-revalidate" forResponseHeader:"Cache-Control")
0
                            (request respondWithData:data))
0
                       (else
0
                            (puts ((NSString alloc) initWithData:(request body) encoding:NSUTF8StringEncoding))

Comments

    No one has commented yet.