Skip to content

Order of route values shouldn't impact key built #65

@jonathanjto

Description

@jonathanjto

Hi,

When manipulating items using the methods of the OutputCacheManager, RemoveItem for example.

The order of the "RouteValues" should not be important.

Just add "OrderBy" key to this code in the KeyBuilder class for the method
public string BuildKey(string controllerName, string actionName, RouteValueDictionary routeValues)


            if (routeValues != null)
            {
                foreach (var routeValue in routeValues.OrderBy(c => c.Key))
                {
                    builder.Append(BuildKeyFragment(routeValue));
                }
            }


Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions