I just wonder what is best practice to store template files? In CMS I have using templates and some of parameters are stored in database… But there are some issues then i need to change something in templates or change one of parameter in many pages. Site has 100K unique visits every day… and I don’t really want to make experiments with site. Just whant to know what is best for performance, to store templates and parameters in database or in file?
Share
Database access will on the whole be quicker (for many concurrent reads) than disks (unless highly mirrored). And it is more scalable but this depends on configuration making this highly subjective.
extended
Because your files will be quite small, memcache+SQL backend is still better than JBOD or sync of directories between nodes. Unless you want a SAN/NAS but that will work out more expensive if you just want to serve a bunch of small text segments. This is based on the fact you are probably already using an RDBMS of some kind.
Really, it depends on too many factors to go into.