[ticket/9781] Disable search results caching if caching is actually disabled

PHPBB3-9781