Beispiel #1
0
 public bool FlushDB(string key = "*")
 {
     if (!IsCachingServer)
     {
         return(false);
     }
     try
     {
         if (key.Length < 1 || key == "*")
         {
             Sut.FlushDb();
             return(true);
         }
         else
         {
             var keys = Sut.SearchKeys(key + ":*");
             if (keys.Count() > 0)
             {
                 Sut.RemoveAll(keys);
             }
             return(true);
         }
     }
     catch
     {
         return(false);
     }
 }
Beispiel #2
0
        public IActionResult Flush()
        {
            ICacheClient client = getCacheClient();

            client.FlushDb();
            return(Ok());
        }
 public void Clear()
 {
     _database.FlushDb();
 }
Beispiel #4
0
 public void Clear()
 {
     client.FlushDb();
 }
Beispiel #5
0
 public void FlushDb()
 {
     _clientExt.FlushDb();
 }