Skip to content

SwrCacheKey.Normalize method

Normalizes a URL cache key by sorting query string parameters alphabetically. Ensures /api/data?b=2&a=1 and /api/data?a=1&b=2 resolve to the same cache entry.

public static string Normalize(string url)
parameterdescription
urlThe URL to normalize.

The normalized URL with query parameters sorted alphabetically.