[BUGFIX] Fix unit test for ``CacheManager``
This is a follow-up to the "Improve security performance" change
(If6ccf8d7bbbe25cfcd6596a88a6192bf051bc9f5) fixing a unit test.
The backport of this change from master to the 3.0 branch did not
include all the required changes in the unit test case.