I’ve inherited a project which saves the pages generated by php into database an then it calls them from a php controller on demand. I can’t understand why they did this…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One reason to do this might be if generating the page is slow / computationally intense or if the generated result does not change very often. Storing the resulting HTML in a database sounds like some form of caching.
Also possible (though much less likely) is that they wanted to perform queries on the resulting HTML. This might make sense if the HTML contains the result of a long-running summary report. Searching for the summary data might be faster by searching the pre-generated HTML report rather than running a query directly against the data. I’ve seen similar things with XML data being stored and searched on, but not HTML.
Without seeing this particular project, it’s hard for me to say any more…