better way to init cache