Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:33:41+00:00 2026-06-04T08:33:41+00:00

When you call RazorEngine.Razor.Compile() , where is the compiled template stored? Is it available

  • 0

When you call RazorEngine.Razor.Compile(), where is the compiled template stored?

Is it available after the programs been restarted? If there is a memory shortage, will it be dumped?

I am using RazorEngine in an ASP.NET (MVC) project. Will the precompiled templates be available after the application restarts?

Would it make more sense for me to store them in the HttpContext.Cache?
If I did, then would it make more sense to use a different function (other than Compile) that bypasses the internal cache? Is there a way to execute an ITemplate and just pass it a model?

Does RazorEngine.Razor.Parse() do any caching? Or is the template recompiled each time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:33:42+00:00Added an answer on June 4, 2026 at 8:33 am

    Currently, after the RazorEngine compiles the templates, they are loaded into memory. These assemblies persist in memory only and do not continue beyond the lifetime of the application.

    I am considering adding in support for compiling these assemblies to files, but that’ll be a future version.

    If you call Razor.Parse and pass in a name for the template, it will attempt to

    1. Check the cache of in-memory assemblies for an assembly with the same name.
    2. Invalid the cache of the content of the template has changed.
    3. Cache the newly compiled template.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I call this a flash meeting, but maybe there is another more appropriate name.
I call sortable.stop() to make an ajax call to store some data after drag
I call a template like this from my view: return render_to_response('mytemplate.html', context_instance=RequestContext(request)) I'm trying
I'm using mvc3 razor engine from view I call function with Uri.Action which return
Smarty {call} built-in function is able to call a template function defined by the
WhenI call this stored procedure: ALTER PROCEDURE [dbo].[GetSorted] ( @OrderByColumn nvarchar(256) ) AS SET
A call of help from iOS developers out there. I am trying to recognize
Call me stupid but this thing has been eating away my productive time like
I call the load method. There are some occasions when the page it calls
I call a remote data source and get back json. After I select an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.