Clear cache and adjust cache sizes.