Better fix to resetting category cache.