Use SettingsOverride(…) for cache test

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Merge pull request #2772 from mkoistinen/cache_tests_with_settings_override

Use SettingsOverride(…) for cache test