[Rt-commit] [rtir] 02/02: Clear HasConstituency cache

Kevin Falcone falcone at bestpractical.com
Thu Apr 24 17:59:05 EDT 2014


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 3.2/caching
in repository rtir.

commit 381d14ab0920b6fe850e4dd0e63069c995f2f7f8
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Apr 24 17:55:46 2014 -0400

    Clear HasConstituency cache
    
    When 70eeabf4 added checking to only override methods if Constituency is
    enabled, it added a cache.  Unfortunately, it never cleared the cache.
    Combined with the CFs never clearing their cache (see f8568e7e2) this
    surely led to some bizarre behavior if you disbaled the Constituency CF
    that persisted until restarting apache.
---
 lib/RT/IR.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 78a7fc4..ffdb53e 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -603,6 +603,9 @@ sub HasConstituency {
 
     my $self = shift;
     return $cache = $self->CustomFields('Constituency');
+}
+sub _FlushHasConstituencyCache {
+    undef $cache;
 } }
 
 sub DefaultConstituency {
@@ -636,6 +639,7 @@ if ( RT::IR->HasConstituency ) {
         %RT::IR::HasNoQueueCache = ();
         RT::Queue::_FlushQueueHasRightCache();
         RT::IR::_FlushCustomFieldsCache();
+        RT::IR::_FlushHasConstituencyCache();
         $orig_CleanupRequest->();
     };
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list