Can I force Smarty to store compiled templates into database rather than file on the disk?
Not yet… But perhaps you could find someone to implement it A: You shouldn’t, it will be a great performance disadvantage, because PHP cannot execute them directly from database. A: Technically, you can use PHP’s recently added streams API to implement your storage type at the PHP level. This would enable PHP to include your code just as if it was a local file; unfortunately, this isn’t trivial to implement and would likely require some customizations to Smarty as well.