mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Disable ASP.NET output cache module
This commit is contained in:
@@ -228,11 +228,6 @@ namespace Orchard.OutputCache.Filters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't enable public caching for requests with query string
|
|
||||||
if (queryString.AllKeys.Any()) {
|
|
||||||
_maxAge = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// compute the cache key
|
// compute the cache key
|
||||||
_cacheKey = ComputeCacheKey(filterContext, parameters);
|
_cacheKey = ComputeCacheKey(filterContext, parameters);
|
||||||
|
|
||||||
@@ -489,6 +484,11 @@ namespace Orchard.OutputCache.Filters {
|
|||||||
response.Cache.SetMaxAge(maxAge);
|
response.Cache.SetMaxAge(maxAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// keeping this examples for later usage
|
||||||
|
// response.Cache.VaryByParams["*"] = true;
|
||||||
|
// response.DisableUserCache();
|
||||||
|
// response.DisableKernelCache();
|
||||||
|
|
||||||
// an ETag is a string that uniquely identifies a specific version of a component.
|
// an ETag is a string that uniquely identifies a specific version of a component.
|
||||||
// we use the cache item to detect if it's a new one
|
// we use the cache item to detect if it's a new one
|
||||||
if (HttpRuntime.UsingIntegratedPipeline) {
|
if (HttpRuntime.UsingIntegratedPipeline) {
|
||||||
@@ -654,7 +654,11 @@ namespace Orchard.OutputCache.Filters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing) {
|
protected override void Dispose(bool disposing) {
|
||||||
_mem.Dispose();
|
if (disposing) {
|
||||||
|
_mem.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,9 +99,11 @@
|
|||||||
<validation validateIntegratedModeConfiguration="false" />
|
<validation validateIntegratedModeConfiguration="false" />
|
||||||
|
|
||||||
<modules runAllManagedModulesForAllRequests="false">
|
<modules runAllManagedModulesForAllRequests="false">
|
||||||
|
<remove name="OutputCache" />
|
||||||
<remove name="WarmupHttpModule"/>
|
<remove name="WarmupHttpModule"/>
|
||||||
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7.2, Culture=neutral"/>
|
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.7.2, Culture=neutral"/>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<handlers accessPolicy="Script">
|
<handlers accessPolicy="Script">
|
||||||
<!-- Clear all handlers, prevents executing code file extensions or returning any file contents. -->
|
<!-- Clear all handlers, prevents executing code file extensions or returning any file contents. -->
|
||||||
<clear/>
|
<clear/>
|
||||||
|
Reference in New Issue
Block a user