File tree Expand file tree Collapse file tree
tests/ImageSharp.Web.Tests/Caching Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// Licensed under the Apache License, Version 2.0.
33
44using System ;
5- using System . Text ;
65using Microsoft . AspNetCore . Http ;
76using SixLabors . ImageSharp . Web . Caching ;
87using SixLabors . ImageSharp . Web . Commands ;
@@ -104,33 +103,5 @@ private static HttpContext CreateHttpContext()
104103
105104 return httpContext ;
106105 }
107-
108- /// <summary>
109- /// Original implementation of cache key creation.
110- /// </summary>
111- public class CacheKeyBaseline : ICacheKey
112- {
113- /// <inheritdoc/>
114- public string Create ( HttpContext context , CommandCollection commands )
115- {
116- var sb = new StringBuilder ( context . Request . Host . ToString ( ) ) ;
117-
118- string pathBase = context . Request . PathBase . ToString ( ) ;
119- if ( ! string . IsNullOrWhiteSpace ( pathBase ) )
120- {
121- sb . AppendFormat ( "{0}/" , pathBase ) ;
122- }
123-
124- string path = context . Request . Path . ToString ( ) ;
125- if ( ! string . IsNullOrWhiteSpace ( path ) )
126- {
127- sb . Append ( path ) ;
128- }
129-
130- sb . Append ( QueryString . Create ( commands ) ) ;
131-
132- return sb . ToString ( ) . ToLowerInvariant ( ) ;
133- }
134- }
135106 }
136107}
You can’t perform that action at this time.
0 commit comments