From 33ed5685b0df4c659467e3c0d759f7d3c91d297f Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 16 Mar 2011 02:11:45 +0100 Subject: Replace outdated cache data instead of crashing when encountering some. --- mulkcms.lisp | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3