C# Class Terradue.OpenSearch.Filters.OpenSearchMemoryCache

Class that implements a cache for OpenSearch Request and Response.
Show file Open project: Terradue/DotNetOpenSearch Class Usage Examples

Public Methods

Method Description
CacheResponse ( OpenSearchRequest request, IOpenSearchResponse &response ) : void

Caches the response.

ClearCache ( string pattern, System.DateTime since ) : void
EntryRemovedCallBack ( System.Runtime.Caching.CacheEntryRemovedArguments arguments ) : void
OpenSearchMemoryCache ( ) : System
OpenSearchMemoryCache ( string name, NameValueCollection config = null ) : System

Initializes a new instance of the Terradue.OpenSearch.Filters.OpenSearchMemoryCache class.

TryReplaceWithCacheRequest ( OpenSearchRequest &request ) : void

Tries the replace with cache request.

Protected Methods

Method Description
CreatePolicy ( OpenSearchResponseCacheItem item, OpenSearchRequest request ) : System.Runtime.Caching.CacheItemPolicy

Creates the policy.

Method Details

CacheResponse() public method

Caches the response.
public CacheResponse ( OpenSearchRequest request, IOpenSearchResponse &response ) : void
request Terradue.OpenSearch.Request.OpenSearchRequest Request.
response IOpenSearchResponse Response.
return void

ClearCache() public method

public ClearCache ( string pattern, System.DateTime since ) : void
pattern string
since System.DateTime
return void

CreatePolicy() protected method

Creates the policy.
protected CreatePolicy ( OpenSearchResponseCacheItem item, OpenSearchRequest request ) : System.Runtime.Caching.CacheItemPolicy
item OpenSearchResponseCacheItem Item.
request Terradue.OpenSearch.Request.OpenSearchRequest
return System.Runtime.Caching.CacheItemPolicy

EntryRemovedCallBack() public method

public EntryRemovedCallBack ( System.Runtime.Caching.CacheEntryRemovedArguments arguments ) : void
arguments System.Runtime.Caching.CacheEntryRemovedArguments
return void

OpenSearchMemoryCache() public method

public OpenSearchMemoryCache ( ) : System
return System

OpenSearchMemoryCache() public method

Initializes a new instance of the Terradue.OpenSearch.Filters.OpenSearchMemoryCache class.
public OpenSearchMemoryCache ( string name, NameValueCollection config = null ) : System
name string Name.
config System.Collections.Specialized.NameValueCollection Config.
return System

TryReplaceWithCacheRequest() public method

Tries the replace with cache request.
public TryReplaceWithCacheRequest ( OpenSearchRequest &request ) : void
request Terradue.OpenSearch.Request.OpenSearchRequest Request.
return void