Invalidate cache on deletion.
[pr0n] / 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=?',