fix createCache fn