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