| File: System\Net\Cache\RequestCachePolicy.cs | Web Access |
| Project: src\runtime\src\libraries\System.Net.Primitives\src\System.Net.Primitives.csproj (System.Net.Primitives) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. namespace System.Net.Cache { public class RequestCachePolicy { public RequestCachePolicy() { Level = RequestCacheLevel.Default; } public RequestCachePolicy(RequestCacheLevel level) { if (level < RequestCacheLevel.Default || level > RequestCacheLevel.NoCacheNoStore) { throw new ArgumentOutOfRangeException(nameof(level)); } Level = level; } public RequestCacheLevel Level { get; } public override string ToString() => "Level:" + Level.ToString(); } }