Standalone usage of SparkViewEngine and views caching

65 views
Skip to first unread message

mogadanez

unread,
Jun 15, 2012, 12:38:30 PM6/15/12
to spar...@googlegroups.com
can  i setup somehow caching for views  compilation result

or views does not compile in standalone usage?

Rob G

unread,
Jun 15, 2012, 12:56:56 PM6/15/12
to spar...@googlegroups.com
Hi there,

Does this answer your question?  http://sparkviewengine.com/documentation/precompiling 

If not - can you explain your requirement in more detail?

Thanks,
Rob

On Fri, Jun 15, 2012 at 5:38 PM, mogadanez <moga...@gmail.com> wrote:
can  i setup somehow caching for views  compilation result

or views does not compile in standalone usage?

--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spark-dev/-/9e8jRSGwnnIJ.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.

Alexander Popov

unread,
Jun 17, 2012, 9:51:27 AM6/17/12
to spar...@googlegroups.com
Not exact, templates can change on running system, so precompiled views not answer for me.

in case of asp.net mvc Spark! parse views once and create  "compiled" files in Temporary ASP.NET files.

does  Spark! do something similar in case of standalone usage( only Spark.dll ) for email templates.

Rob G

unread,
Jul 7, 2012, 3:37:48 AM7/7/12
to spar...@googlegroups.com
Hi Alexander,

The cache is implemented as MVC (or other web framework) level to take advantage of the fact that web servers provide caching in the HTTP context.

So Spark Core doesn't do that currently unless you go the precompiled route. I have worked on projects where we built mechanisms to watch for files changes, and constantly recompile on the fly and put into a local cache where something like and email service or other stand alone apps could reach them, but that is not part of core Spark. I've also gone the T4 Templates route in Visual Studio and invoked the Spark view engine core from tt files to constantly render the .cs files out as part of a Singe File Generator, but of course that only works from inside VS.

Hope those ideas help out.

Regards,
Rob
Reply all
Reply to author
Forward
0 new messages