some fixes to the caching setup

Signed-off-by: Marc MacLeod <marbemac@gmail.com>