diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-16 02:11:45 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-16 02:11:45 +0100 |
commit | 33ed5685b0df4c659467e3c0d759f7d3c91d297f (patch) | |
tree | 7fe2c96e2771ddf5066a6f7e9efe8b08dadfc688 | |
parent | 6b8f39b642ec0617711161c5b70e5fe3dc802e4a (diff) |
Replace outdated cache data instead of crashing when encountering some.
-rw-r--r-- | mulkcms.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp index 3bb2095..642be8e 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -102,6 +102,12 @@ (if (and cached-data (simple-date:time< last-update (second cached-data))) (first cached-data) (let ((generated-content (funcall thunk))) + (query "DELETE FROM cached_pages + WHERE characteristic_hash = $1 + AND alias = $2" + charhashnum + path + :none) (query "INSERT INTO cached_pages(characteristic_hash, alias, content) VALUES ($1, $2, $3)" charhashnum |