mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
[feat] Add Response caching
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Octokit.Caching;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
@@ -163,6 +164,21 @@ namespace Octokit
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convenience property for setting response cache.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Setting this property will wrap existing <see cref="IHttpClient"/> in <see cref="CachingHttpClient"/>.
|
||||
/// </remarks>
|
||||
public IResponseCache ResponseCache
|
||||
{
|
||||
set
|
||||
{
|
||||
Ensure.ArgumentNotNull(value, nameof(value));
|
||||
Connection.ResponseCache = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The base address of the GitHub API. This defaults to https://api.github.com,
|
||||
/// but you can change it if needed (to talk to a GitHub:Enterprise server for instance).
|
||||
|
||||
Reference in New Issue
Block a user