08-01-2018, 01:10 AM
(07-31-2018, 10:39 PM)Alexandre Machado Wrote:(07-15-2018, 05:23 AM)joel Wrote: I would like to store templates in a database and then use them with a tiwTemplateProcessHTML.
Does anyone know if it is possible to load a template from a database directly to a stream and have a tiwTemplateProcessorHTML use it without having to first save the file to the template location on the disk?
Yes, you can load your template from stream, using a correspondent event in template processor component.
I just can't *stress* enough how this is going to kill your application performance if you don't cache it externally. Rendering times will likely to double, even if your DB performance is outstanding.
Thanks for the input. I am making a page that dynamically uses a template that is stored in the database. Since I don't want to kill the performance I will retrieve it from the database and then save it to a file and use it from there.
Do you see any issues if I save the "temporary" file for the template to the "user" cache? This way when the session is cleared it will be cleaned up.

