ItemController.Display has na execution branch allowing to only return the Partial for the content being displayed when invoked by and ajax call (or similar).
While it would be possible, as a workaround, to set the headers for that in the settings for the output cache, we would have to set those on every tenant anyway. We propose to have that directly in the "base" cachekey computed in the OutputCacheFilter, just like the test above is in the "base" ItemController.
https://github.com/OrchardCMS/Orchard/blob/a402c82c23c726911dd0e704b3985e76de43c529/src/Orchard.Web/Core/Contents/Controllers/ItemController.cs#L49
ItemController.Display has na execution branch allowing to only return the Partial for the content being displayed when invoked by and ajax call (or similar).
However when computing the CacheKey,
OutputCacheFilter
doesn't differentiate between the two kinds of call. https://github.com/OrchardCMS/Orchard/blob/91a82535a24c8e13d1c16d078051e4b16ca98735/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs#L752While it would be possible, as a workaround, to set the headers for that in the settings for the output cache, we would have to set those on every tenant anyway. We propose to have that directly in the "base" cachekey computed in the
OutputCacheFilter
, just like the test above is in the "base"ItemController
.