added support for caching to swim