public DeleteValueResponse DeleteValue(string key) { var response = new DeleteValueResponse(); try { this.DeleteCookie(key); response.Status = StatusCode.OK; } catch (Exception ex) { response.Status = StatusCode.InternalServerError; this.exceptionHandler.HandleException(ex); } return(response); }
public DeleteValueResponse DeleteValue(string key) { var response = new DeleteValueResponse(); try { this.cache.Remove(key); response.Status = StatusCode.OK; } catch (ArgumentException) { response.Status = StatusCode.BadRequest; } catch (Exception ex) { response.Status = StatusCode.InternalServerError; this.exceptionHandler.HandleException(ex); } return(response); }