public static async Task OperationOnCache() { var repeatProcess = "n"; do { try { var cacheConfig = IGNITE_CLIENT_SECOND.GetCache <string, ICustomCacheStore>(_CACHE_NAME2).GetConfiguration(); if (cacheConfig == null) { IGNITE_CLIENT_SECOND.AddCacheConfiguration(await CreateCacheConfigurationTemplate(_CACHE_NAME2)); //next to do operation on cache //get or create cache //query on cache } else { //get or create cache //query on cache } } catch (Exception ex) { Console.WriteLine(ex.InnerException.ToString()); } Console.WriteLine("Do you want to repeat process.(y/n)"); repeatProcess = Console.ReadLine(); } while (repeatProcess == "y" || repeatProcess == "Y" || repeatProcess == ""); }