[Rt-commit] rt branch, 4.0/remove-cache-self, created. rt-4.0.7-60-gf3e6b37
Thomas Sibley
trs at bestpractical.com
Mon Sep 17 19:27:15 EDT 2012
The branch, 4.0/remove-cache-self has been created
at f3e6b375b9899115df98a38278355d646aafec8a (commit)
- Log -----------------------------------------------------------------
commit f3e6b375b9899115df98a38278355d646aafec8a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Mon Sep 17 16:18:50 2012 -0700
cache_self doesn't play nice with our use of flush_buffer; remove it
Calling flush_buffer explicitly (as RT does in many places) causes
cache_self to only cache partial content. Specifically, it only caches
the content generated since the last call to flush_buffer. This is a
Mason bug[1] which, despite a patch and tests, will not be fixed by the
authors due to Mason 1's status as maint-only and the complexity of
Mason's buffering and caching system.
An alternate solution removes all (or a few strategic) calls to
flush_buffer, but that's a more widely affecting change. This GnuPG
admin element shouldn't be used terribly much on a day to day basis, and
being a little slower because of the removal of cache_self is an
acceptable trade-off.
[1] Mason bug: https://rt.cpan.org/Ticket/Display.html?id=78754
diff --git a/share/html/Admin/Elements/ShowKeyInfo b/share/html/Admin/Elements/ShowKeyInfo
index 2ec319a..39669b2 100644
--- a/share/html/Admin/Elements/ShowKeyInfo
+++ b/share/html/Admin/Elements/ShowKeyInfo
@@ -80,7 +80,6 @@ $EmailAddress
$Type => 'public'
</%ARGS>
<%INIT>
-return if ($m->cache_self( key => join("||",$EmailAddress,$Type, $$), expires_in => '2 minutes'));
require RT::Crypt::GnuPG;
my %res = RT::Crypt::GnuPG::GetKeyInfo( $EmailAddress, $Type );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list