M
M
Mikhail5552014-07-30 09:34:41
caching
Mikhail555, 2014-07-30 09:34:41

Is it possible to cache the pages of a site, saving completely ready pages without using the output buffer in php?

Faced with the task of writing a site, as the customer says, the site will be highly loaded. One of the points of the TOR is the high speed of work. I have already begun to use the output buffer for caching, as before, but then I thought about it and decided to do it differently. It's a no brainer that the fastest site will work, consisting of simple html pages. But what if you just make up an HTML template with empty content, GENERALLY without inserting php code, and separate templates to fill in that content. Then allow the administrator to create pages.
It would be more correct to say that when adding a product, a completely ready-made HTML page is generated, in which the content is filled with another mini-template, either by DOMDocument or by the usual preg_replace function. And after the client has already contacted the site, index will check for the presence of the desired file and display it and stop the script, and if not, connect to the database and already generate the page on the fly.
I omitted many nuances, for example, if a new product is added from the admin panel, both the main page and the page with categories, main menu items, etc. will change. The essence of the question is whether it is worth bothering so much, and is it not nonsense?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question