http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7248

--- Comment #35 from Paul Poulain <[email protected]> ---
Looking at how this caching works in bug 7249, I think this part of the code is
wrong: 

+if ($usecache) {
+    require Koha::Cache;
+    Koha::Cache->import();
+    $cache = Koha::Cache->new(
+        {
+            'cache_type'    => 'memcached',
+            'cache_servers' => $ENV{'MEMCACHED_SERVERS'}
+        }
+    );
+    my $namespace = $ENV{'MEMCACHED_NAMESPACE'} || 'koha';
+    my $page = $cache->get_from_cache("$namespace:intranet:report:$report");
+    if ($page) {
+        print $query->header;
+        print $page;
+        exit;
+    }
+}

=> 'memcached' is hardcoded in the file that use caching, the caching mechanism
must be generic.

The caching API must be something like:
use Koha::Cache;
my $cache_server = Koha::Cache->new();
if $cache_server( my $page =
$cache->get_from_cache("intranet:report:$report");)

so it won't depend on the caching system & caching configuration.

I'll provide a patch for that ASAP (maybe today)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to