#174. Add createCache and tests