Bugzilla – Attachment 60922 Details for
Bug 18232
Koha::Cache::flush - Simply flush all caches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18232 - Koha::Cache::flush - Simply flush all caches
Bug-18232---KohaCacheflush---Simply-flush-all-cach.patch (text/plain), 1018 bytes, created by
Olli-Antti Kivilahti
on 2017-03-08 15:50:19 UTC
(
hide
)
Description:
Bug 18232 - Koha::Cache::flush - Simply flush all caches
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2017-03-08 15:50:19 UTC
Size:
1018 bytes
patch
obsolete
>From 125df28d4bd061528acdbaa70a224d4c1f7f2994 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Mon, 9 Jan 2017 18:10:03 +0200 >Subject: [PATCH] Bug 18232 - Koha::Cache::flush - Simply flush all caches > >So we can easily and without reading the code, figure out how to flush all caches. > > perl -e 'use Koha::Caches; Koha::Caches::flush();' > >This is handy dandy when upgrading Koha or fiddling with configs. >--- > Koha/Caches.pm | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/Koha/Caches.pm b/Koha/Caches.pm >index 8940925..cb3081f 100644 >--- a/Koha/Caches.pm >+++ b/Koha/Caches.pm >@@ -64,4 +64,21 @@ sub flush_L1_caches { > } > } > >+=head2 >+ >+ Koha::Caches::flush(); >+ >+Flushes all known L1 and L2 caches >+ >+=cut >+ >+sub flush { >+ return unless $singleton_caches; >+ for my $k ( keys %$singleton_caches ) { >+ my $cache = $singleton_caches->{$k}; >+ $cache->flush_all(); >+ delete $singleton_caches->{$k}; >+ } >+} >+ > 1; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18232
: 60922 |
68468