Make cache size have an 'auto' setting.

This commit doesn't compile and hasn't been tested.
Make things compile. Update cache size tests.