I’m currently working on a presentation site for a company. The site itself is not very complex in its code but they have a high demand for being able to customize a lot of things themselves without any knowledge of basic coding or CSS.
I’ve created a option panel for them inside the administration area where they both can give different CSS properties values (like font size, font color, link-behavior, etc.) and they also have a small translation area where every word not directly linked with a post or page can be translated into five language (e.g. the placeholder text for the newsletter input box and the newsletter subscribe button).
This is all very good but it comes at a price. For each page load a lot of database queries have to be run to get all the information and most of the time it is same information. They will rarely change the default text-color on the site for example but they want the ability to do it nonetheless.
Is there a way or a “best practice” to how to overcome these problem or do I simply tell my client that they can’t both have high-performance and a completely customizable interface for the front-end.
Can I cache the query or the data so it doesn’t load every time a page loads? Can I store e.g. the CSS settings in a session and only load it when the session expire? I know that a session is risky business to use as a “cache-like” layer because it quickly can clock up the memory but the CSS settings is not a lot of data.
Hope someone has some good insights and maybe have been in a similar situation before with some points to which direction is the way to go.