mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Update DefaultCacheStorageProvider.cs
This commit is contained in:
@@ -27,7 +27,8 @@ namespace Orchard.OutputCache.Services {
|
||||
}
|
||||
|
||||
public void Remove(string key) {
|
||||
_workContext.HttpContext.Cache.Remove(key);
|
||||
if (_workContext.HttpContext != null)
|
||||
_workContext.HttpContext.Cache.Remove(key);
|
||||
}
|
||||
|
||||
public void RemoveAll() {
|
||||
@@ -63,4 +64,4 @@ namespace Orchard.OutputCache.Services {
|
||||
.Count(x => x.Tenant.Equals(_tenantName, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user