RazorEngine


ICachingProvider

Defined in RazorEngine.dll.

This interface represents the caching layer.

Instance members

Instance memberDescription
CacheTemplate(template, key)
Signature: (template:ICompiledTemplate * key:ITemplateKey) -> unit
Modifiers: abstract

Request that a given template should be cached.

TryRetrieveTemplate(...)
Signature: (key:ITemplateKey * modelType:Type * template:byref<ICompiledTemplate>) -> bool
Modifiers: abstract

Try to resolve a template within the cache.

Returns: true if a template was found.

Remarks

Implementations MUST decide if they allow multiple model-types for the same template key and SHOULD throw a exception when a template is requested with the wrong type!

TypeLoader
Signature: TypeLoader
Modifiers: abstract

Every caching provider must manage a ICachingProvider.TypeLoader instance. This instance makes sure that all assemblies can be resolved properly.

Fork me on GitHub