Skip to content

Instantly share code, notes, and snippets.

...
public string UsingTemplateFromEmbedded<T>(string path, T model)
{
// Generate the template name
string templateName = GetTemplateName(path);
string template = memoryCache.Get<string>(templateName);
if(string.IsNullOrEmpty(template))
{
// Locking this resource is necessary since there are parallel requests to this methnod