added caching

This was in the bootstrap shell but belonged in the theme core so that
it may function with all shells.