7
7
namespace Microsoft . AspNetCore . OutputCaching ;
8
8
9
9
/// <summary>
10
- /// Defines *all* the logger messages produced by response caching
10
+ /// Defines the logger messages produced by output caching
11
11
/// </summary>
12
12
internal static partial class LoggerExtensions
13
13
{
@@ -19,109 +19,51 @@ internal static partial class LoggerExtensions
19
19
EventName = "RequestWithAuthorizationNotCacheable" ) ]
20
20
internal static partial void RequestWithAuthorizationNotCacheable ( this ILogger logger ) ;
21
21
22
- [ LoggerMessage ( 3 , LogLevel . Debug , "The request cannot be served from cache because it contains a 'no-cache' cache directive." ,
23
- EventName = "RequestWithNoCacheNotCacheable" ) ]
24
- internal static partial void RequestWithNoCacheNotCacheable ( this ILogger logger ) ;
25
-
26
- [ LoggerMessage ( 4 , LogLevel . Debug , "The request cannot be served from cache because it contains a 'no-cache' pragma directive." ,
27
- EventName = "RequestWithPragmaNoCacheNotCacheable" ) ]
28
- internal static partial void RequestWithPragmaNoCacheNotCacheable ( this ILogger logger ) ;
29
-
30
- [ LoggerMessage ( 5 , LogLevel . Debug , "Adding a minimum freshness requirement of {Duration} specified by the 'min-fresh' cache directive." ,
31
- EventName = "LogRequestMethodNotCacheable" ) ]
32
- internal static partial void ExpirationMinFreshAdded ( this ILogger logger , TimeSpan duration ) ;
33
-
34
- [ LoggerMessage ( 6 , LogLevel . Debug , "The age of the entry is {Age} and has exceeded the maximum age for shared caches of {SharedMaxAge} specified by the 's-maxage' cache directive." ,
35
- EventName = "ExpirationSharedMaxAgeExceeded" ) ]
36
- internal static partial void ExpirationSharedMaxAgeExceeded ( this ILogger logger , TimeSpan age , TimeSpan sharedMaxAge ) ;
37
-
38
- [ LoggerMessage ( 7 , LogLevel . Debug , "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive. " +
39
- "It must be revalidated because the 'must-revalidate' or 'proxy-revalidate' cache directive is specified." ,
40
- EventName = "ExpirationMustRevalidate" ) ]
41
- internal static partial void ExpirationMustRevalidate ( this ILogger logger , TimeSpan age , TimeSpan maxAge ) ;
42
-
43
- [ LoggerMessage ( 8 , LogLevel . Debug , "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive. " +
44
- "However, it satisfied the maximum stale allowance of {MaxStale} specified by the 'max-stale' cache directive." ,
45
- EventName = "ExpirationMaxStaleSatisfied" ) ]
46
- internal static partial void ExpirationMaxStaleSatisfied ( this ILogger logger , TimeSpan age , TimeSpan maxAge , TimeSpan maxStale ) ;
47
-
48
- [ LoggerMessage ( 9 , LogLevel . Debug , "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive." , EventName = "ExpirationMaxAgeExceeded" ) ]
49
- internal static partial void ExpirationMaxAgeExceeded ( this ILogger logger , TimeSpan age , TimeSpan maxAge ) ;
50
-
51
- [ LoggerMessage ( 10 , LogLevel . Debug , "The response time of the entry is {ResponseTime} and has exceeded its expiry date of {Expired} specified by the 'Expires' header." ,
52
- EventName = "ExpirationExpiresExceeded" ) ]
53
- internal static partial void ExpirationExpiresExceeded ( this ILogger logger , DateTimeOffset responseTime , DateTimeOffset expired ) ;
54
-
55
- [ LoggerMessage ( 11 , LogLevel . Debug , "Response is not cacheable because it does not contain the 'public' cache directive." ,
56
- EventName = "ResponseWithoutPublicNotCacheable" ) ]
57
- internal static partial void ResponseWithoutPublicNotCacheable ( this ILogger logger ) ;
58
-
59
- [ LoggerMessage ( 12 , LogLevel . Debug , "Response is not cacheable because it or its corresponding request contains a 'no-store' cache directive." ,
60
- EventName = "ResponseWithNoStoreNotCacheable" ) ]
61
- internal static partial void ResponseWithNoStoreNotCacheable ( this ILogger logger ) ;
62
- [ LoggerMessage ( 13 , LogLevel . Debug , "Response is not cacheable because it contains a 'no-cache' cache directive." ,
63
- EventName = "ResponseWithNoCacheNotCacheable" ) ]
64
- internal static partial void ResponseWithNoCacheNotCacheable ( this ILogger logger ) ;
65
-
66
- [ LoggerMessage ( 14 , LogLevel . Debug , "Response is not cacheable because it contains a 'SetCookie' header." , EventName = "ResponseWithSetCookieNotCacheable" ) ]
22
+ [ LoggerMessage ( 3 , LogLevel . Debug , "Response is not cacheable because it contains a 'SetCookie' header." , EventName = "ResponseWithSetCookieNotCacheable" ) ]
67
23
internal static partial void ResponseWithSetCookieNotCacheable ( this ILogger logger ) ;
68
24
69
- [ LoggerMessage ( 15 , LogLevel . Debug , "Response is not cacheable because it contains a '.Vary' header with a value of *." ,
70
- EventName = "ResponseWithVaryStarNotCacheable" ) ]
71
- internal static partial void ResponseWithVaryStarNotCacheable ( this ILogger logger ) ;
72
-
73
- [ LoggerMessage ( 16 , LogLevel . Debug , "Response is not cacheable because it contains the 'private' cache directive." ,
74
- EventName = "ResponseWithPrivateNotCacheable" ) ]
75
- internal static partial void ResponseWithPrivateNotCacheable ( this ILogger logger ) ;
76
-
77
- [ LoggerMessage ( 17 , LogLevel . Debug , "Response is not cacheable because its status code {StatusCode} does not indicate success." ,
25
+ [ LoggerMessage ( 4 , LogLevel . Debug , "Response is not cacheable because its status code {StatusCode} does not indicate success." ,
78
26
EventName = "ResponseWithUnsuccessfulStatusCodeNotCacheable" ) ]
79
27
internal static partial void ResponseWithUnsuccessfulStatusCodeNotCacheable ( this ILogger logger , int statusCode ) ;
80
28
81
- [ LoggerMessage ( 18 , LogLevel . Debug , "The 'IfNoneMatch' header of the request contains a value of *." , EventName = "ExpirationExpiresExceeded " ) ]
29
+ [ LoggerMessage ( 5 , LogLevel . Debug , "The 'IfNoneMatch' header of the request contains a value of *." , EventName = "NotModifiedIfNoneMatchStar " ) ]
82
30
internal static partial void NotModifiedIfNoneMatchStar ( this ILogger logger ) ;
83
31
84
- [ LoggerMessage ( 19 , LogLevel . Debug , "The ETag {ETag} in the 'IfNoneMatch' header matched the ETag of a cached entry." ,
32
+ [ LoggerMessage ( 6 , LogLevel . Debug , "The ETag {ETag} in the 'IfNoneMatch' header matched the ETag of a cached entry." ,
85
33
EventName = "NotModifiedIfNoneMatchMatched" ) ]
86
34
internal static partial void NotModifiedIfNoneMatchMatched ( this ILogger logger , EntityTagHeaderValue etag ) ;
87
35
88
- [ LoggerMessage ( 20 , LogLevel . Debug , "The last modified date of {LastModified} is before the date {IfModifiedSince} specified in the 'IfModifiedSince' header." ,
36
+ [ LoggerMessage ( 7 , LogLevel . Debug , "The last modified date of {LastModified} is before the date {IfModifiedSince} specified in the 'IfModifiedSince' header." ,
89
37
EventName = "NotModifiedIfModifiedSinceSatisfied" ) ]
90
38
internal static partial void NotModifiedIfModifiedSinceSatisfied ( this ILogger logger , DateTimeOffset lastModified , DateTimeOffset ifModifiedSince ) ;
91
39
92
- [ LoggerMessage ( 21 , LogLevel . Information , "The content requested has not been modified." , EventName = "NotModifiedServed" ) ]
40
+ [ LoggerMessage ( 8 , LogLevel . Information , "The content requested has not been modified." , EventName = "NotModifiedServed" ) ]
93
41
internal static partial void NotModifiedServed ( this ILogger logger ) ;
94
42
95
- [ LoggerMessage ( 22 , LogLevel . Information , "Serving response from cache." , EventName = "CachedResponseServed" ) ]
43
+ [ LoggerMessage ( 9 , LogLevel . Information , "Serving response from cache." , EventName = "CachedResponseServed" ) ]
96
44
internal static partial void CachedResponseServed ( this ILogger logger ) ;
97
45
98
- [ LoggerMessage ( 23 , LogLevel . Information , "No cached response available for this request and the 'only-if-cached' cache directive was specified." ,
46
+ [ LoggerMessage ( 10 , LogLevel . Information , "No cached response available for this request and the 'only-if-cached' cache directive was specified." ,
99
47
EventName = "GatewayTimeoutServed" ) ]
100
48
internal static partial void GatewayTimeoutServed ( this ILogger logger ) ;
101
49
102
- [ LoggerMessage ( 24 , LogLevel . Information , "No cached response available for this request." , EventName = "NoResponseServed" ) ]
50
+ [ LoggerMessage ( 11 , LogLevel . Information , "No cached response available for this request." , EventName = "NoResponseServed" ) ]
103
51
internal static partial void NoResponseServed ( this ILogger logger ) ;
104
52
105
- [ LoggerMessage ( 25 , LogLevel . Debug , "Vary by rules were updated. Headers: {Headers}, Query keys: {QueryKeys}" , EventName = "VaryByRulesUpdated" ) ]
53
+ [ LoggerMessage ( 12 , LogLevel . Debug , "Vary by rules were updated. Headers: {Headers}, Query keys: {QueryKeys}" , EventName = "VaryByRulesUpdated" ) ]
106
54
internal static partial void VaryByRulesUpdated ( this ILogger logger , string headers , string queryKeys ) ;
107
55
108
- [ LoggerMessage ( 26 , LogLevel . Information , "The response has been cached." , EventName = "ResponseCached" ) ]
56
+ [ LoggerMessage ( 13 , LogLevel . Information , "The response has been cached." , EventName = "ResponseCached" ) ]
109
57
internal static partial void ResponseCached ( this ILogger logger ) ;
110
58
111
- [ LoggerMessage ( 27 , LogLevel . Information , "The response could not be cached for this request." , EventName = "ResponseNotCached" ) ]
112
- internal static partial void LogResponseNotCached ( this ILogger logger ) ;
59
+ [ LoggerMessage ( 14 , LogLevel . Information , "The response could not be cached for this request." , EventName = "ResponseNotCached" ) ]
60
+ internal static partial void ResponseNotCached ( this ILogger logger ) ;
113
61
114
- [ LoggerMessage ( 28 , LogLevel . Warning , "The response could not be cached for this request because the 'Content-Length' did not match the body length." ,
115
- EventName = "responseContentLengthMismatchNotCached " ) ]
62
+ [ LoggerMessage ( 15 , LogLevel . Warning , "The response could not be cached for this request because the 'Content-Length' did not match the body length." ,
63
+ EventName = "ResponseContentLengthMismatchNotCached " ) ]
116
64
internal static partial void ResponseContentLengthMismatchNotCached ( this ILogger logger ) ;
117
65
118
- [ LoggerMessage ( 29 , LogLevel . Debug ,
119
- "The age of the entry is {Age} and has exceeded the maximum age of {MaxAge} specified by the 'max-age' cache directive. " +
120
- "However, the 'max-stale' cache directive was specified without an assigned value and a stale response of any age is accepted." ,
121
- EventName = "ExpirationInfiniteMaxStaleSatisfied" ) ]
122
- internal static partial void ExpirationInfiniteMaxStaleSatisfied ( this ILogger logger , TimeSpan age , TimeSpan maxAge ) ;
123
-
124
- [ LoggerMessage ( 30 , LogLevel . Debug , "The response time of the entry is {ResponseTime} and has exceeded its expiry date." ,
66
+ [ LoggerMessage ( 16 , LogLevel . Debug , "The response time of the entry is {ResponseTime} and has exceeded its expiry date." ,
125
67
EventName = "ExpirationExpiresExceeded" ) ]
126
68
internal static partial void ExpirationExpiresExceeded ( this ILogger logger , DateTimeOffset responseTime ) ;
127
69
0 commit comments