IRestApiClientCache
Ecng.Net
Provides caching functionality for REST API client responses.
Métodos
Remove
public void Remove(HttpMethod method, string uriLike, ComparisonOperator op)
iRestApiClientCache.Remove(method, uriLike, op)
Removes cached entries based on the specified HTTP method and a URI pattern.
- method
- The HTTP method to match for removal. Defaults to the default value of HttpMethod if not specified.
- uriLike
- A string pattern to match part of the URI for removal. If null or empty, no URI filter is applied.
- op
- The comparison operator to apply when filtering URIs. Defaults to Greater if not specified.
Set``1
public void Set<T>(HttpMethod method, Uri uri, object body, T value)
iRestApiClientCache.Set(method, uri, body, value)
Caches the specified value for the given HTTP method, URI, and request body.
- method
- The HTTP method of the request.
- uri
- The URI of the request.
- body
- The request body.
- value
- The value to be cached.
TryGet``1
public bool TryGet<T>(HttpMethod method, Uri uri, object body, T value)
result = iRestApiClientCache.TryGet(method, uri, body, value)
Attempts to retrieve a cached value for the specified HTTP method, URI, and request body.
- method
- The HTTP method of the request.
- uri
- The URI of the request.
- body
- The request body.
- value
- When this method returns, contains the cached value if found; otherwise, the default value for the type.
Devuelve: true if a cached value was found; otherwise, false.