mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Fixes #13504. This commit is purely an improvement in error handling. We used to not do any validation on keys before passing them to memcached, which meant for invalid keys, memcached's own key validation would throw an exception. Unfortunately, the resulting error messages are super hard to read; the traceback structure doesn't even show where the call into memcached happened. In this commit we add validation to all the basic cache_* functions, and appropriate handling in their callers. We also add a lot of tests for the new behavior, which has the nice effect of giving us decent coverage of all these core caching functions which previously had been primarily tested manually.
12 KiB
12 KiB