initialise a mem_cache struct.