From f9712ee228bd1401f2367c1933542a1257c131bb Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Mon, 18 Feb 2013 22:24:29 -0300 Subject: [PATCH] Follow-up Bug 7387 - Add Template::Toolkit plugin to allow caching of includes Fixes tabulations. Signed-off-by: Elliott Davis Signed-off-by: Jared Camins-Esakov --- Koha/Template/Plugin/Cache.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Koha/Template/Plugin/Cache.pm b/Koha/Template/Plugin/Cache.pm index 1bdb665a52..fb3a76a63d 100644 --- a/Koha/Template/Plugin/Cache.pm +++ b/Koha/Template/Plugin/Cache.pm @@ -37,7 +37,7 @@ sub new { } else { require Koha::Cache; - $cache = Koha::Cache->new( { 'cache_type' => 'memcached', 'cache_servers' => C4::Context->config('memcached_servers') }); + $cache = Koha::Cache->new( { 'cache_type' => 'memcached', 'cache_servers' => C4::Context->config('memcached_servers') }); } my $self = bless { CACHE => $cache, @@ -77,15 +77,14 @@ sub _cached_action { ':', ( $params->{template}, - map { "$_=$cache_keys->{$_}" } keys %{$cache_keys} + map { "$_=$cache_keys->{$_}" } keys %{$cache_keys} ) ); } my $result = $self->{CACHE}->get_from_cache($key); if ( !$result ) { - warn "here in not in cache"; - $result = $self->{CONTEXT}->$action( $params->{template} ); - $self->{CACHE}->set_in_cache( $key, $result, $params->{ttl} ); + $result = $self->{CONTEXT}->$action( $params->{template} ); + $self->{CACHE}->set_in_cache( $key, $result, $params->{ttl} ); } return $result; } -- 2.39.5