View | Details | Raw Unified | Return to bug 7432
Collapse All | Expand All

(-)a/C4/Languages.pm (-9 / +9 lines)
Lines 30-44 eval { Link Here
30
    if ($servers) {
30
    if ($servers) {
31
        require Memoize::Memcached;
31
        require Memoize::Memcached;
32
        import Memoize::Memcached qw(memoize_memcached);
32
        import Memoize::Memcached qw(memoize_memcached);
33
 
34
        my $memcached = {
35
            servers    => [ $servers ],
36
            key_prefix => C4::Context->config('memcached_namespace') || 'koha',
37
        };
38
33
39
        memoize_memcached('getTranslatedLanguages', memcached => $memcached, expire_time => 600); #cache for 10 minutes
34
        my $memcached = {
40
        memoize_memcached('getFrameworkLanguages' , memcached => $memcached, expire_time => 600);
35
            servers     => [$servers],
41
        memoize_memcached('getAllLanguages',        memcached => $memcached, expire_time => 600);
36
            key_prefix  => C4::Context->config('memcached_namespace') || 'koha',
37
            expire_time => 600
38
        };    # cache for 10 mins
39
40
        memoize_memcached( 'getTranslatedLanguages', memcached => $memcached );
41
        memoize_memcached( 'getFrameworkLanguages',  memcached => $memcached );
42
        memoize_memcached( 'getAllLanguages',        memcached => $memcached );
42
    }
43
    }
43
};
44
};
44
45
45
- 

Return to bug 7432