Bug 25158 - Introduce koha-memcached
Summary: Introduce koha-memcached
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 12:28 UTC by Magnus Enger
Modified: 2024-01-01 13:57 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 25158 - Introduce koha-memcached (4.20 KB, patch)
2020-04-15 12:33 UTC, Magnus Enger
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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?