#210 ✓resolved
Sven Fuchs

Theme support template invalidation in production

Reported by Sven Fuchs | January 23rd, 2009 @ 08:37 PM | in Release 0.1.1

In production ActionView compiles ERB templates and caches the result as dynamically created Ruby methods in memory.

When a template was saved the theme support engine removes this method from memory so it gets rebuilt on the next request.

This mechanism does not work with more than one server (Mongrel) process running because the cached method would need to be removed from all running server processes.

Instead we could have a "pull" mechanism here that checks the last theme modification time against a timestamp that is cached in memory when the first template was compiled. When the theme was modified after the first template was compiled then all compiled template methods can be removed (and will then be rebuilt).

This requires an extra check to occur each time #render is called so we might not want to compare mtimes for every template separately but instead sweep the whole compiled methods cache for the theme at once.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<p>Cutting edge cms, blog, wiki, forum ... plattform.</p>

<p>Find the code on <a href="http://github.com/svenfuchs/adva_cms/tree/master">GitHub: adva cms</a></p>

<p>Part of the business application framework <a href="http://www.advabest.org/">adva best</a>.</p>

People watching this ticket

Pages