createCache function

Function used to create or activate a permanent cache.