Skip to content

Issue with OutputCache for AjaxRequests #8629

@MatteoPiovanelli

Description

@MatteoPiovanelli

if (_hca.Current().Request.IsAjaxRequest()) {

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.

protected virtual string ComputeCacheKey(ControllerContext controllerContext, IEnumerable<KeyValuePair<string, object>> parameters) {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions