Bug 25158

Summary: Introduce koha-memcached
Product: Koha Reporter: Magnus Enger <magnus>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: mirko
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 25158 - Introduce koha-memcached

Description Magnus Enger 2020-04-15 12:28:44 UTC
"Interacting" with memcached has been a problem, since pretty much the only thing we can easily do with it is restart it to empty it of all cached values. This is less than ideal, especially in a multi-tenant setup where several Koha instances share the same server, and also the same memcached server. This is especially true when sessions are saved in memcached, which means that "flushing" (restarting) the cache for one site terminates all active sessions for all sites. 

koha-memcached tries to fix this by providing a convenient script to list all keys in memcached, get their values and delete them. This is done as a script similar to koha-mysql etc. 

Now, while researching this I read that doing things like listing all keys in memcached might not always be possible. It does seem to work in the testing I have done so far though. Maybe a single instance of memcached on localhost is less problematic in this respect then if you have a cluster of servers etc? More opinions on this is needed. 

The script relies on Memcached::libmemcached and memcdump. 

This is mostly a proof of concept, with some rough edges that need to be worked on a bit more, *if* this approach is something we think is worth pursuing. Feedback is most welcome!
Comment 1 Magnus Enger 2020-04-15 12:33:22 UTC
Created attachment 102994 [details] [review]
Bug 25158 - Introduce koha-memcached

Introducing a proof of concept koha-memcached script. See Bugzilla
for more on the background.

To test: Run the script with --help to see the available options,
then play around with them in a testing environment to see if they
work as they should, without unexpected sideeffects.
Comment 2 Magnus Enger 2022-10-18 12:35:05 UTC
I suspect this is made obsolete by misc/bin/clear_cache.pl from Bug 20116.
Comment 3 Katrin Fischer 2024-01-01 13:57:31 UTC
(In reply to Magnus Enger from comment #2)
> I suspect this is made obsolete by misc/bin/clear_cache.pl from Bug 20116.

Should we close?