Much smarter stack cache, with larger defaults.

A different approach.