// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.ResponseCaching
{
public interface IKeyProvider
{
///
/// Create a base key using the HTTP context for storing items.
///
/// The .
/// The created base key.
string CreateStorageBaseKey(HttpContext httpContext);
///
/// Create one or more base keys using the HTTP context for looking up items.
///
/// The .
/// An ordered containing the base keys to try when looking up items.
IEnumerable CreateLookupBaseKey(HttpContext httpContext);
///
/// Create a vary key using the HTTP context and vary rules for storing items.
///
/// The .
/// The .
/// The created vary key.
string CreateStorageVaryKey(HttpContext httpContext, VaryRules varyRules);
///
/// Create one or more vary keys using the HTTP context and vary rules for looking up items.
///
/// The .
/// The .
/// An ordered containing the vary keys to try when looking up items.
IEnumerable CreateLookupVaryKey(HttpContext httpContext, VaryRules varyRules);
}
}