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

(-)a/about.pl (-1 / +6 lines)
Lines 75-86 if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { Link Here
75
my $memcached_servers   = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers');
75
my $memcached_servers   = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers');
76
my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha';
76
my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha';
77
77
78
my $effective_caching_method = ref(Koha::Caches->get_instance->cache);
78
my $cache = Koha::Caches->get_instance;
79
my $effective_caching_method = ref($cache->cache);
80
# Memcached may have been running when plack has been initialized but could have been stopped since
81
# FIXME What are the consequences of that??
82
my $is_memcached_still_active = $cache->set_in_cache('test_for_about_page', "just a simple value");
79
83
80
$template->param(
84
$template->param(
81
    effective_caching_method => $effective_caching_method,
85
    effective_caching_method => $effective_caching_method,
82
    memcached_servers   => $memcached_servers,
86
    memcached_servers   => $memcached_servers,
83
    memcached_namespace => $memcached_namespace,
87
    memcached_namespace => $memcached_namespace,
88
    is_memcached_still_active => $is_memcached_still_active,
84
    memcached_running   => Koha::Caches->get_instance->memcached_cache
89
    memcached_running   => Koha::Caches->get_instance->memcached_cache
85
);
90
);
86
91
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-3 / +9 lines)
Lines 58-65 Link Here
58
                    Namespace: [% IF memcached_namespace %]<span>[% memcached_namespace | html %]</span>
58
                    Namespace: [% IF memcached_namespace %]<span>[% memcached_namespace | html %]</span>
59
                               [% ELSE %]<span>undefined</span>[% END %] |
59
                               [% ELSE %]<span>undefined</span>[% END %] |
60
                    Status: [% IF memcached_servers %]
60
                    Status: [% IF memcached_servers %]
61
                                [% IF memcached_running %]<span class="status_ok">running</span>
61
                                [% IF memcached_running %]
62
                                [% ELSE %]<span class="status_warn">not running</span>[% END %]
62
                                    [% IF is_memcached_still_active %]
63
                                        <span class="status_ok">running</span>
64
                                    [% ELSE %]
65
                                        <span class="status_warn">no longer running</span><span>, restart memcached!</span>
66
                                    [% END %]
67
                                [% ELSE %]
68
                                    <span class="status_warn">not running</span>
69
                                [% END %]
63
                            [% ELSE %]
70
                            [% ELSE %]
64
                                <span>unknown</span>
71
                                <span>unknown</span>
65
                            [% END %]
72
                            [% END %]
66
- 

Return to bug 17261