wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r7304: LJSUP-4267.

Committer: wisest-owl
LJSUP-4267.
Delete memcache key for vgift after any vgifts' editing.


U   trunk/htdocs/admin/vgift/edit.bml
Modified: trunk/htdocs/admin/vgift/edit.bml
===================================================================
--- trunk/htdocs/admin/vgift/edit.bml	2009-05-15 06:50:03 UTC (rev 7303)
+++ trunk/htdocs/admin/vgift/edit.bml	2009-05-15 08:26:57 UTC (rev 7304)
@@ -92,7 +92,9 @@
         foreach my $cat (@$vgift_cats) {
             my $res = $dbh->do ("UPDATE vgift_in_cats SET sup_flag = ? WHERE vgift_id = ? and cat_id = ?", undef, $POST{'is_sup_radio_'.$cat->[1]} || 'all', $vgift_id, $cat->[1]);
         }
-       
+
+        LJ::MemCache::delete("shop_vgifts");
+
         my $cat_name = LJ::Pay::ShopVGift::get_cat_name($vgift_cats->[0]->[1]);
         return BML::redirect("$LJ::SITEROOT/admin/vgift/edit.bml?mode=vgiftlist&cat=" . $cat_name );
       
@@ -104,11 +106,13 @@
     my $all_cats = LJ::Pay::ShopVGift::get_all_categories();
     my $cat_id = $all_cats->{cats}{$GET{cat}}[2];
     my $res = $dbh->do('INSERT INTO vgift_in_cats (vgift_id, cat_id) VALUES (?, ?)', undef, $GET{gift_id}, $cat_id);
+    LJ::MemCache::delete("shop_vgifts");
     return BML::redirect("$LJ::SITEROOT/admin/vgift/edit.bml?mode=vgiftedit&vgift_id=" . $GET{gift_id} );
 }
 
 if ($mode eq "catdel") {
     my $res = $dbh->do('DELETE FROM vgift_in_cats WHERE cat_id = ? AND vgift_id = ?', undef, $GET{cat_id}, $GET{gift_id});
+    LJ::MemCache::delete("shop_vgifts");
     return BML::redirect("$LJ::SITEROOT/admin/vgift/edit.bml?mode=vgiftedit&vgift_id=" . $GET{gift_id} );
 }
 

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments