11
11
using Microsoft . AspNetCore . Hosting ;
12
12
using Microsoft . Extensions . FileProviders ;
13
13
14
+ #if NETCOREAPP2_0 || NETSTANDARD2_0
15
+ using IWebHostEnvironment = Microsoft . AspNetCore . Hosting . IHostingEnvironment ;
16
+ #endif
17
+
14
18
namespace React . AspNet
15
19
{
16
20
/// <summary>
@@ -19,14 +23,14 @@ namespace React.AspNet
19
23
public class MemoryFileCacheCore : ICache
20
24
{
21
25
private readonly IMemoryCache _cache ;
22
- private readonly IHostingEnvironment _hostingEnv ;
26
+ private readonly IWebHostEnvironment _hostingEnv ;
23
27
24
28
/// <summary>
25
29
/// Initializes a new instance of the <see cref="MemoryFileCacheCore" /> class.
26
30
/// </summary>
27
31
/// <param name="cache">The cache to use</param>
28
32
/// <param name="hostingEnv">The ASP.NET hosting environment.</param>
29
- public MemoryFileCacheCore ( IMemoryCache cache , IHostingEnvironment hostingEnv )
33
+ public MemoryFileCacheCore ( IMemoryCache cache , IWebHostEnvironment hostingEnv )
30
34
{
31
35
_cache = cache ;
32
36
_hostingEnv = hostingEnv ;
@@ -52,7 +56,7 @@ public MemoryFileCacheCore(IMemoryCache cache, IHostingEnvironment hostingEnv)
52
56
/// <param name="key">The cache key</param>
53
57
/// <param name="data">Data to cache</param>
54
58
/// <param name="slidingExpiration">
55
- /// Sliding expiration, if cache key is not accessed in this time period it will
59
+ /// Sliding expiration, if cache key is not accessed in this time period it will
56
60
/// automatically be removed from the cache
57
61
/// </param>
58
62
/// <param name="cacheDependencyFiles">
0 commit comments