diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2009-10-07 12:16:35 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2009-10-07 12:16:35 +0200 |
commit | 0161b4b655e549d57fef122cabae5d4e380a4e95 (patch) | |
tree | b7286abc28ab2aeab805341abc7aa472688ac0db /utils.lisp | |
parent | b388b7c6921d9661b474b7acd1a3ea5748bfeb37 (diff) |
Implement sane caching behaviour.
Ignore-this: 8ed0815613cb44c0eee9d8ac47e1753b
darcs-hash:e41ff965d8172b7979369cb0df98302f29a9a9c4
Diffstat (limited to 'utils.lisp')
-rw-r--r-- | utils.lisp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -325,3 +325,13 @@ ELEMENT-TYPE as the stream's." (submitter-user-agent comment) (spamp comment) (body-of comment)))) + +(defun revalidate-cache-or-die () + #+clisp + (let ((time (cybertiggyr-time:parse-time *if-modified-since*))) + (when (and (integerp time) (>= *if-modified-since* (compute-journal-last-modified-date))) + (http-add-header "Status: 304 Not Modified") + (http-send-headers) + (ext:quit 0))) + #-clisp + nil) |