caching written with tests