Bugzilla – Attachment 174760 Details for
Bug 38454
Memory (L1) cache is not flushed before API requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38454: Flush memory cache before every API request
Bug-38454-Flush-memory-cache-before-every-API-requ.patch (text/plain), 1.04 KB, created by
David Cook
on 2024-11-19 00:23:32 UTC
(
hide
)
Description:
Bug 38454: Flush memory cache before every API request
Filename:
MIME Type:
Creator:
David Cook
Created:
2024-11-19 00:23:32 UTC
Size:
1.04 KB
patch
obsolete
>From bb1a7efea75655933d2d2745e86f430436811227 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 15 Nov 2024 11:24:17 +0100 >Subject: [PATCH] Bug 38454: Flush memory cache before every API request > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > Koha/REST/V1.pm | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index 52bd15697e..8a79189501 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -62,6 +62,17 @@ sub startup { > if C4::Context->preference('AccessControlAllowOrigin'); > } > ); >+ $self->hook( >+ around_action => sub { >+ my ($next, $c, $action, $last) = @_; >+ >+ # Flush memory caches before every request >+ Koha::Caches->flush_L1_caches(); >+ Koha::Cache::Memory::Lite->flush(); >+ >+ return $next->(); >+ } >+ ); > > # Force charset=utf8 in Content-Type header for JSON responses > $self->types->type( json => 'application/json; charset=utf8' ); >-- >2.39.5
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 38454
:
174554
|
174557
|
174760
|
174761
|
176673