diff options
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index a1a6944f0..f069b19d2 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -938,7 +938,15 @@ sub create { Bugzilla->fields({ by_name => 1 }); return $cache->{template_bug_fields}; }, - + + # A general purpose cache to store rendered templates for reuse. + # Make sure to not mix language-specific data. + 'template_cache' => sub { + my $cache = Bugzilla->request_cache->{template_cache} ||= {}; + $cache->{users} ||= {}; + return $cache; + }, + 'css_files' => \&css_files, yui_resolve_deps => \&yui_resolve_deps, |