275 references to CacheValidationStatus
System (275)
net\System\Net\_FtpControlStream.cs (4)
564if (request.CacheProtocol != null && request.CacheProtocol.ProtocolStatus == CacheValidationStatus.DoNotTakeFromCache && request.MethodInfo.Operation == FtpOperation.DownloadFile) 570if (request.CacheProtocol == null || request.CacheProtocol.ProtocolStatus != CacheValidationStatus.Continue) 587if (request.CacheProtocol != null && request.CacheProtocol.ProtocolStatus == CacheValidationStatus.CombineCachedAndServerResponse) 609if (request.CacheProtocol == null || request.CacheProtocol.ProtocolStatus != CacheValidationStatus.Continue)
net\System\Net\Cache\_RequestCacheProtocol.cs (80)
39private CacheValidationStatus _ProtocolStatus; 55internal CacheValidationStatus ProtocolStatus {get {return _ProtocolStatus;}} 76internal CacheValidationStatus GetRetrieveStatus (Uri cacheUri, WebRequest request) 85if (!_CanTakeNewRequest || _ProtocolStatus == CacheValidationStatus.RetryResponseFromServer) 86return CacheValidationStatus.Continue; 93_ProtocolStatus = CacheValidationStatus.Continue; 100_ProtocolStatus = CacheValidationStatus.DoNotUseCache; 106_ProtocolStatus = CacheValidationStatus.DoNotUseCache; 114case CacheValidationStatus.Continue: // This is a green light for cache protocol 117case CacheValidationStatus.DoNotTakeFromCache: // no cache but response can be cached 118case CacheValidationStatus.DoNotUseCache: // ignore cache entirely 121case CacheValidationStatus.Fail: 126_ProtocolStatus = CacheValidationStatus.Fail; 132if (_ProtocolStatus != CacheValidationStatus.Continue) 142_ProtocolStatus = CacheValidationStatus.Fail; 157internal CacheValidationStatus GetRevalidateStatus (WebResponse response, Stream responseStream) 162if (_ProtocolStatus == CacheValidationStatus.DoNotUseCache) 163return CacheValidationStatus.DoNotUseCache; 166if (_ProtocolStatus == CacheValidationStatus.ReturnCachedResponse) 168_ProtocolStatus = CacheValidationStatus.DoNotUseCache; 177if (_ProtocolStatus != CacheValidationStatus.Continue && _ProtocolStatus != CacheValidationStatus.RetryResponseFromServer) 194internal CacheValidationStatus GetUpdateStatus (WebResponse response, Stream responseStream) 199if (_ProtocolStatus == CacheValidationStatus.DoNotUseCache) 200return CacheValidationStatus.DoNotUseCache; 208if (_ProtocolStatus == CacheValidationStatus.RemoveFromCache) 214if (_ProtocolStatus != CacheValidationStatus.DoNotTakeFromCache && 215_ProtocolStatus != CacheValidationStatus.ReturnCachedResponse && 216_ProtocolStatus != CacheValidationStatus.CombineCachedAndServerResponse) 226_ProtocolStatus = CacheValidationStatus.Fail; 284GlobalLog.Assert(_ProtocolStatus == CacheValidationStatus.Continue, "CheckRetrieveBeforeSubmit()|Unexpected _ProtocolStatus = {0}", _ProtocolStatus); 331case CacheValidationStatus.ReturnCachedResponse: 335_ProtocolStatus = CacheValidationStatus.Fail; 354case CacheValidationStatus.Continue: 359case CacheValidationStatus.RetryResponseFromCache: 363case CacheValidationStatus.DoNotTakeFromCache: 364case CacheValidationStatus.DoNotUseCache: 367case CacheValidationStatus.Fail: 372_ProtocolStatus = CacheValidationStatus.Fail; 381_ProtocolStatus = CacheValidationStatus.Fail; 400GlobalLog.Assert(_ProtocolStatus == CacheValidationStatus.Continue || _ProtocolStatus == CacheValidationStatus.RetryResponseFromServer, "CheckRetrieveOnResponse()|Unexpected _ProtocolStatus = ", _ProtocolStatus); 408case CacheValidationStatus.Continue: 413case CacheValidationStatus.RetryResponseFromServer: 418case CacheValidationStatus.Fail: 419_ProtocolStatus = CacheValidationStatus.Fail; 423case CacheValidationStatus.DoNotUseCache: 427_ProtocolStatus = CacheValidationStatus.Fail; 437_ProtocolStatus = CacheValidationStatus.Fail; 453if (_ProtocolStatus != CacheValidationStatus.Continue) { 470case CacheValidationStatus.DoNotUseCache: 471case CacheValidationStatus.RemoveFromCache: 472case CacheValidationStatus.DoNotTakeFromCache: 476case CacheValidationStatus.ReturnCachedResponse: 479_ProtocolStatus = CacheValidationStatus.Fail; 496case CacheValidationStatus.CombineCachedAndServerResponse: 500_ProtocolStatus = CacheValidationStatus.Fail; 522case CacheValidationStatus.Fail: 529_ProtocolStatus = CacheValidationStatus.Fail; 538_ProtocolStatus = CacheValidationStatus.Fail; 579case CacheValidationStatus.RemoveFromCache: 584case CacheValidationStatus.UpdateResponseInformation: 606_ProtocolStatus = CacheValidationStatus.UpdateResponseInformation; 609case CacheValidationStatus.CacheResponse: 621_ProtocolStatus = CacheValidationStatus.DoNotUpdateCache; 625_ProtocolStatus = CacheValidationStatus.UpdateResponseInformation; 629case CacheValidationStatus.DoNotUseCache: 630case CacheValidationStatus.DoNotUpdateCache: 633case CacheValidationStatus.Fail: 637_ProtocolStatus = CacheValidationStatus.Fail; 652private CacheValidationStatus ValidateRequest() { 659CacheValidationStatus result = _Validator.ValidateRequest(); 707private CacheValidationStatus ValidateCache() { 708CacheValidationStatus result = _Validator.ValidateCache(); 715private CacheValidationStatus RevalidateCache() { 717CacheValidationStatus result = _Validator.RevalidateCache(); 724private CacheValidationStatus ValidateResponse() 727CacheValidationStatus result = _Validator.ValidateResponse(); 734private CacheValidationStatus UpdateCache() 736CacheValidationStatus result = _Validator.UpdateCache();
net\System\Net\Cache\_Rfc2616CacheValidators.cs (75)
45public static CacheValidationStatus OnValidateRequest(HttpRequestCacheValidator ctx) 48CacheValidationStatus result = Common.OnValidateRequest(ctx); 50if (result == CacheValidationStatus.DoNotUseCache) 76result = CacheValidationStatus.DoNotTakeFromCache; 78else if (result == CacheValidationStatus.Continue) 85result = CacheValidationStatus.DoNotTakeFromCache; 92result = CacheValidationStatus.DoNotTakeFromCache; 149public static CacheValidationStatus OnValidateCache(HttpRequestCacheValidator ctx) 156return CacheValidationStatus.DoNotTakeFromCache; 170return CacheValidationStatus.DoNotTakeFromCache; 184CacheValidationStatus result = Common.TryResponseFromCache(ctx); 186if (result != CacheValidationStatus.ReturnCachedResponse) { 189return CacheValidationStatus.DoNotTakeFromCache; 195return CacheValidationStatus.ReturnCachedResponse; 205public static CacheValidationStatus OnValidateResponse(HttpRequestCacheValidator ctx) 215return CacheValidationStatus.Continue; 221return CacheValidationStatus.Continue; 230return CacheValidationStatus.RetryResponseFromServer; 238return CacheValidationStatus.RetryResponseFromServer; 249return CacheValidationStatus.RetryResponseFromServer; 256return CacheValidationStatus.RetryResponseFromServer; 267return CacheValidationStatus.RetryResponseFromServer; 280return CacheValidationStatus.RetryResponseFromServer; 297return CacheValidationStatus.Continue; 307public static CacheValidationStatus OnUpdateCache(HttpRequestCacheValidator ctx) { 312return CacheValidationStatus.RemoveFromCache; 341if (ctx.ValidationStatus == CacheValidationStatus.RemoveFromCache) { 342return CacheValidationStatus.RemoveFromCache; 345CacheValidationStatus noUpdateResult = 347?CacheValidationStatus.RemoveFromCache 348:CacheValidationStatus.DoNotUpdateCache; 354CacheValidationStatus result = CacheValidationStatus.CacheResponse; 359result = CacheValidationStatus.UpdateResponseInformation; 438public static CacheValidationStatus OnValidateRequest(HttpRequestCacheValidator ctx) { 458return CacheValidationStatus.DoNotTakeFromCache; 470return CacheValidationStatus.DoNotUseCache; 490return CacheValidationStatus.DoNotTakeFromCache; 493return CacheValidationStatus.Continue; 1042public static CacheValidationStatus ValidateCacheAfterResponse(HttpRequestCacheValidator ctx, HttpWebResponse resp) { 1048return CacheValidationStatus.DoNotTakeFromCache; 1082return CacheValidationStatus.RemoveFromCache; 1101return CacheValidationStatus.RemoveFromCache; 1108return CacheValidationStatus.DoNotTakeFromCache; 1147return CacheValidationStatus.CombineCachedAndServerResponse; 1191return CacheValidationStatus.ReturnCachedResponse; 1249return CacheValidationStatus.ReturnCachedResponse; 1254return CacheValidationStatus.DoNotTakeFromCache; 1262public static CacheValidationStatus ValidateCacheOn5XXResponse(HttpRequestCacheValidator ctx) { 1273return CacheValidationStatus.DoNotTakeFromCache; 1280return CacheValidationStatus.DoNotTakeFromCache; 1285return CacheValidationStatus.DoNotTakeFromCache; 1292return CacheValidationStatus.ReturnCachedResponse; 1300return CacheValidationStatus.ReturnCachedResponse; 1303return CacheValidationStatus.DoNotTakeFromCache; 1408public static CacheValidationStatus TryConditionalRequest(HttpRequestCacheValidator ctx) { 1415return CacheValidationStatus.Continue; 1424return CacheValidationStatus.DoNotTakeFromCache; 1431return CacheValidationStatus.Continue; 1433return CacheValidationStatus.DoNotTakeFromCache; 1445public static CacheValidationStatus TryResponseFromCache(HttpRequestCacheValidator ctx) { 1451return CacheValidationStatus.ReturnCachedResponse; 1462return CacheValidationStatus.DoNotTakeFromCache; 1475return CacheValidationStatus.Continue; 1492return CacheValidationStatus.ReturnCachedResponse; 1508return CacheValidationStatus.ReturnCachedResponse; 1513return CacheValidationStatus.DoNotTakeFromCache; 1520return CacheValidationStatus.Continue; 1523return CacheValidationStatus.Continue; 1586public static CacheValidationStatus ConstructConditionalRequest(HttpRequestCacheValidator ctx) { 1588CacheValidationStatus result = CacheValidationStatus.DoNotTakeFromCache; 1595result = CacheValidationStatus.Continue; 1604result = CacheValidationStatus.Continue; 1619if (result == CacheValidationStatus.DoNotTakeFromCache) {
net\System\Net\Cache\FtpRequestCacheValidator.cs (52)
64protected internal override CacheValidationStatus ValidateRequest() 77return CacheValidationStatus.DoNotUseCache; 99return CacheValidationStatus.DoNotTakeFromCache; 104return CacheValidationStatus.DoNotUseCache; 108return CacheValidationStatus.DoNotTakeFromCache; 110return CacheValidationStatus.Continue; 185protected internal override CacheValidationStatus ValidateCache() 195return CacheValidationStatus.DoNotTakeFromCache; 208return CacheValidationStatus.DoNotTakeFromCache; 237return CacheValidationStatus.DoNotTakeFromCache; 241return CacheValidationStatus.ReturnCachedResponse; 244return CacheValidationStatus.DoNotTakeFromCache; 249protected internal override CacheValidationStatus RevalidateCache() 260return CacheValidationStatus.DoNotTakeFromCache; 266return CacheValidationStatus.DoNotTakeFromCache; 273CacheValidationStatus result = CacheValidationStatus.DoNotTakeFromCache; 279return CacheValidationStatus.DoNotTakeFromCache; 291result = CacheValidationStatus.DoNotTakeFromCache; 305result = CacheValidationStatus.CombineCachedAndServerResponse; 309result = CacheValidationStatus.ReturnCachedResponse; 312result = CacheValidationStatus.DoNotTakeFromCache; 315result = CacheValidationStatus.DoNotTakeFromCache; 319result = CacheValidationStatus.DoNotTakeFromCache; 332protected internal override CacheValidationStatus ValidateResponse() 341return CacheValidationStatus.Continue; 348return CacheValidationStatus.Continue; 356return CacheValidationStatus.Continue; 361return CacheValidationStatus.RetryResponseFromServer; 363return CacheValidationStatus.Continue; 369protected internal override CacheValidationStatus UpdateCache() 380return CacheValidationStatus.DoNotUpdateCache; 383if (ValidationStatus == CacheValidationStatus.RemoveFromCache) { 385return CacheValidationStatus.RemoveFromCache; 390return CacheValidationStatus.DoNotUpdateCache; 398return CacheValidationStatus.DoNotUpdateCache; 413return CacheValidationStatus.RemoveFromCache; 416return CacheValidationStatus.DoNotUpdateCache; 421return CacheValidationStatus.RemoveFromCache; 424if (ValidationStatus == CacheValidationStatus.ReturnCachedResponse) 435return CacheValidationStatus.DoNotUpdateCache; 445return CacheValidationStatus.RemoveFromCache; 447return CacheValidationStatus.DoNotUpdateCache; 456private CacheValidationStatus UpdateCacheEntryOnStore() 470return CacheValidationStatus.CacheResponse; 474private CacheValidationStatus UpdateCacheEntryOnRevalidate() 482return CacheValidationStatus.DoNotUpdateCache; 492return CacheValidationStatus.UpdateResponseInformation; 496private CacheValidationStatus TryConditionalRequest() 500return CacheValidationStatus.DoNotTakeFromCache; 505return CacheValidationStatus.DoNotTakeFromCache; 508return CacheValidationStatus.Continue;
net\System\Net\Cache\HttpRequestCacheValidator.cs (28)
187protected internal override CacheValidationStatus ValidateRequest() { 246protected internal override CacheValidationStatus ValidateCache() { 253return CacheValidationStatus.DoNotTakeFromCache; 265return CacheValidationStatus.DoNotTakeFromCache; 278CacheValidationStatus result = CacheValidationStatus.DoNotTakeFromCache; 292if (result != CacheValidationStatus.ReturnCachedResponse && this.Policy.Level == HttpRequestCacheLevel.CacheOnly) { 297if (result == CacheValidationStatus.ReturnCachedResponse) 310if (result == CacheValidationStatus.DoNotTakeFromCache) { 314else if (result == CacheValidationStatus.ReturnCachedResponse) { 322protected internal override CacheValidationStatus RevalidateCache() 329return CacheValidationStatus.DoNotTakeFromCache; 336return CacheValidationStatus.DoNotTakeFromCache; 345CacheValidationStatus result = CacheValidationStatus.DoNotTakeFromCache; 351return CacheValidationStatus.DoNotTakeFromCache; 356if (Rfc2616.Common.ValidateCacheOn5XXResponse(this) == CacheValidationStatus.ReturnCachedResponse) { 371result = CacheValidationStatus.DoNotTakeFromCache; 387if (result == CacheValidationStatus.ReturnCachedResponse) 403protected internal override CacheValidationStatus ValidateResponse() { 411return CacheValidationStatus.Continue; 418return CacheValidationStatus.Continue; 441protected internal override CacheValidationStatus UpdateCache() { 445return CacheValidationStatus.RemoveFromCache; 449return CacheValidationStatus.DoNotUpdateCache; 465CacheValidationStatus result = Rfc2616.OnUpdateCache(this); 467if (result == CacheValidationStatus.UpdateResponseInformation || result == CacheValidationStatus.CacheResponse)
net\System\Net\Cache\RequestCacheValidator.cs (10)
81private CacheValidationStatus _ValidationStatus; 104_ValidationStatus = CacheValidationStatus.DoNotUseCache; 128protected internal CacheValidationStatus ValidationStatus {get {return _ValidationStatus;}} 167protected internal abstract CacheValidationStatus ValidateRequest(); 171protected internal abstract CacheValidationStatus ValidateCache(); 173protected internal abstract CacheValidationStatus ValidateResponse(); 175protected internal abstract CacheValidationStatus RevalidateCache(); 177protected internal abstract CacheValidationStatus UpdateCache(); 198_ValidationStatus = CacheValidationStatus.DoNotUseCache; 228internal void SetValidationStatus(CacheValidationStatus status)
net\System\Net\FtpWebRequest.cs (16)
1390(CacheProtocol.ProtocolStatus == CacheValidationStatus.Continue || CacheProtocol.ProtocolStatus == CacheValidationStatus.RetryResponseFromServer); 1506(CacheProtocol.ProtocolStatus == CacheValidationStatus.Continue || CacheProtocol.ProtocolStatus == CacheValidationStatus.RetryResponseFromServer); 2034if (CacheProtocol.ProtocolStatus == CacheValidationStatus.CombineCachedAndServerResponse || 2035CacheProtocol.ProtocolStatus == CacheValidationStatus.DoNotTakeFromCache) 2060if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail) { 2064if (CacheProtocol.ProtocolStatus != CacheValidationStatus.ReturnCachedResponse) { 2072if (CacheProtocol.ProtocolStatus == CacheValidationStatus.ReturnCachedResponse) 2105if (CacheProtocol.ProtocolStatus != CacheValidationStatus.Continue) 2111if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail) { 2119if (CacheProtocol.ProtocolStatus == CacheValidationStatus.RetryResponseFromServer) 2127if (CacheProtocol.ProtocolStatus != CacheValidationStatus.ReturnCachedResponse) 2180if (CacheProtocol.ProtocolStatus == CacheValidationStatus.CombineCachedAndServerResponse) 2194if (CacheProtocol.GetUpdateStatus(m_FtpWebResponse, m_FtpWebResponse.GetResponseStream()) == CacheValidationStatus.UpdateResponseInformation) 2199else if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail)
net\System\Net\HttpWebRequest.cs (10)
4219if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail) { 4223if (CacheProtocol.ProtocolStatus != CacheValidationStatus.ReturnCachedResponse) { 4268if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail) { 4276if (CacheProtocol.ProtocolStatus == CacheValidationStatus.RetryResponseFromServer) 4282if (CacheProtocol.ProtocolStatus != CacheValidationStatus.ReturnCachedResponse && 4283CacheProtocol.ProtocolStatus != CacheValidationStatus.CombineCachedAndServerResponse) 4301responseData.m_ResponseHeaders = CacheProtocol.ProtocolStatus == CacheValidationStatus.CombineCachedAndServerResponse 4311if (CacheProtocol.ProtocolStatus == CacheValidationStatus.ReturnCachedResponse) 4346if (CacheProtocol.GetUpdateStatus(_HttpResponse, _HttpResponse.ResponseStream) == CacheValidationStatus.UpdateResponseInformation) 4350else if (CacheProtocol.ProtocolStatus == CacheValidationStatus.Fail)