work in progress: adding support for cache