Invalidate cache on deletion.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 25 Dec 2006 16:29:11 +0000 (17:29 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 25 Dec 2006 16:29:11 +0000 (17:29 +0100)
perl/Sesse/pr0n/Rotate.pm

index 923e5df1cc5149143569c1773f949eb9f347efbc..0733cecb21f5eed78cbbf36af3f6fca41dfd4398 100644 (file)
@@ -43,6 +43,8 @@ sub handler {
                                {
 
                                        eval {
+                                               $dbh->do('UPDATE events SET last_update=CURRENT_TIMESTAMP WHERE event=( SELECT event FROM images WHERE id=? )',
+                                                       undef, $id);
                                                $dbh->do('INSERT INTO deleted_images SELECT * FROM images WHERE id=?',
                                                                undef, $id);
                                                $dbh->do('DELETE FROM images WHERE id=?',