MapCacheLRU: Properly handle bogus cache keys
authorChad Horohoe <chadh@wikimedia.org>
Tue, 6 Dec 2016 20:42:49 +0000 (12:42 -0800)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 6 Dec 2016 20:42:49 +0000 (12:42 -0800)
commit70c2223843b6e7e41457ec6469c3f34a3860cd59
treed463c317f68d4ea2104cd5f7cbd01675a1cd30b3
parentd44c9dfa3a0d16cfbaa21281396c063ebe09eaf4
MapCacheLRU: Properly handle bogus cache keys

They can only be strings or integers. Anything else is wrong. We
should be throwing exceptions here so developers find this early
when running tests and manual testing.

Exceptions (instead of warnings) allow us to get a full useful
stacktrace.

Change-Id: I823ce33523283509c14a05f816f261d6b400e243
includes/libs/MapCacheLRU.php