From: Steinar H. Gunderson Date: Mon, 25 Dec 2006 16:29:11 +0000 (+0100) Subject: Invalidate cache on deletion. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=ebfa7a13cd167409442120036a159a745acc177b;ds=sidebyside Invalidate cache on deletion. --- diff --git a/perl/Sesse/pr0n/Rotate.pm b/perl/Sesse/pr0n/Rotate.pm index 923e5df..0733cec 100644 --- a/perl/Sesse/pr0n/Rotate.pm +++ b/perl/Sesse/pr0n/Rotate.pm @@ -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=?',