From 3ff56a88eebef3699df7e524dea89be7b593337f Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 12 May 2014 13:49:53 +0800 Subject: Bug 992767: backport bug 987032 to bmo (allow memcached to cache bugzilla configuration information) --- Bugzilla/Product.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Product.pm') diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 452ae90fc..3e74b9afd 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -41,6 +41,8 @@ use constant DEFAULT_CLASSIFICATION_ID => 1; #### Initialization #### ############################### +use constant IS_CONFIG => 1; + use constant DB_TABLE => 'products'; use constant DB_COLUMNS => qw( @@ -107,6 +109,7 @@ sub create { Bugzilla::Hook::process('product_end_of_create', { product => $product }); $dbh->bz_commit_transaction(); + Bugzilla->memcached->clear_config(); return $product; } @@ -262,6 +265,7 @@ sub update { # Changes have been committed. delete $self->{check_group_controls}; Bugzilla->user->clear_product_cache(); + Bugzilla->memcached->clear_config(); return $changes; } @@ -320,6 +324,7 @@ sub remove_from_db { $dbh->do("DELETE FROM products WHERE id = ?", undef, $self->id); $dbh->bz_commit_transaction(); + Bugzilla->memcached->clear_config(); # We have to delete these internal variables, else we get # the old lists of products and classifications again. -- cgit v1.2.3-24-g4f1b