RazorEngine


InvalidatingByModifiedTimeCachingProvider

Defined in RazorEngine.dll.

An memory leaking invalidating caching provider (See ICachingProvider). This implementation does a very simple in-memory caching and allows you to release templates by trading with memory. File modification time is used to check if cached template is valid. WARNING: Use this caching provider only on AppDomains you recycle regularly, or to improve the debugging experience. Never use this in production without any recycle strategy.

Constructors

ConstructorDescription
new()
Signature: unit -> unit

Initializes a new instance

new(registerForCleanup)
Signature: registerForCleanup:Action<string> -> unit

Initializes a new instance

Instance members

Instance memberDescription
TryRetrieveTemplate(...)
Signature: (templateKey:ITemplateKey * modelType:Type * compiledTemplate:byref<ICompiledTemplate>) -> bool
Modifiers: abstract

Try to retrieve a template from the cache. See ICachingProvider.TryRetrieveTemplate. If cached template has different modification time, then the cache is invalidated.

Returns:

Fork me on GitHub