Class CachedIvExpressionParser<T, TQuery, TFilter>
Defines a Cached IvExpressionParser that is able to cache the information based on the requested query
Inheritance
System.Object
IvExpressionParser<T, TQuery, TFilter>
CachedIvExpressionParser<T, TQuery, TFilter>
Inherited Members
Namespace: ImageVault.Client.Query.Parser
Assembly: ImageVault.Client.dll
Syntax
public abstract class CachedIvExpressionParser<T, TQuery, TFilter> : IvExpressionParser<T, TQuery, TFilter>, IIvExpressionParser<TQuery>, IIvExpressionParser where TQuery : IIVQuery<TFilter>, new()
where TFilter : IIVFilter
Type Parameters
Name | Description |
---|---|
T | |
TQuery | |
TFilter |
Remarks
Implement the ConstructCacheKey(Type) method to return a cache key if the result should be cached and GetNotCachedResultFromServer(Type) to return the actual result
Constructors
CachedIvExpressionParser(ImageVaultClientOptions, ClientCacheTypes, IObjectCache)
Initializes a new instance of the CachedIvExpressionParser<T, TQuery, TFilter> class.
Declaration
protected CachedIvExpressionParser(ImageVaultClientOptions options, ClientCacheTypes clientCacheType, IObjectCache objectCache)
Parameters
Type | Name | Description |
---|---|---|
ImageVaultClientOptions | options | |
ClientCacheTypes | clientCacheType | |
IObjectCache | objectCache |
Properties
CachePolicy
Gets the ClientCachePolicy of the CachedIVExpressionParser
Declaration
protected ClientCachePolicy CachePolicy { get; }
Property Value
Type | Description |
---|---|
ClientCachePolicy |
Methods
ConstructCacheKey(Type)
Construct a cache key for the call to GetResultFromServer
Declaration
protected abstract string ConstructCacheKey(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
System.String | The key to be used to cache the result or null if the result shouldn't be cached |
GetNotCachedResultFromServer(Type)
Gets the non cached result from the server
Declaration
protected abstract IQueryable GetNotCachedResultFromServer(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
System.Linq.IQueryable |
GetResultFromServer(Type)
Checks the cache and uses the cached information if any exists.
Declaration
public override IQueryable GetResultFromServer(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
System.Linq.IQueryable |
Overrides
ImageVault.Client.Query.Parser.IvExpressionParser<T, TQuery, TFilter>.GetResultFromServer(System.Type)