I am coding the framework for my new site and in the past ive always used a mysql template system. But I am considering using flatfiles but not sure on this one. Currently what I do is select all templates in the global and put them each into a variable so then I run my fetch_template function which will eval the template variable. Why do I select them all at once, because if I run the same query so much then mysql should cache it.
But I want to know if my system would be faster to use flatfiles and if I went this route should I simply do includes or actually readfile? Thanks
Flatfile or MySQL Templates?
Started by mikelbring, Oct 03 2008 10:00 PM
2 replies to this topic
#1
Posted 03 October 2008 - 10:00 PM
|
|
|
#2
Guest_Jordan_*
Posted 04 October 2008 - 07:04 AM
Guest_Jordan_*
I don't get why you read them all at once (turn off caching). How many templates are there? Using a database is cleaner code, IMO but using a file would be faster. You could also use SQLLite with PHP which is essentially a flatfile database.
#3
Posted 04 October 2008 - 11:04 AM
Well if I read them all at once then mysql would get use to the same process over and over and would essential cache it.


Sign In
Create Account


Back to top









