move indices_cache to class