Hello to all! Got a question. On my site almost everything is cached. Cached: last comment, last forum, news, etc .. I cache in this way. The script makes the request once every 5 minutes and writes the request to the definition file. The essence of the question: Does it make sense to cache? How much less load or faster download speed. Maybe there is a tiny difference and easier to do through sql?

The sum of the size of the request is 8-10 kb. Online every day increases, but certainly not a geometric progression. Now online at day 200.

  • What is the load of your project? Almost 100% sure that you have a syndrome of premature optimization ... Perhaps I’m wrong of course, but nevertheless ... <br> Caching is urgently needed if you have a large online and a large base ... <br> In general, in fact everything depends on the project, if you, for example, have a sample from a table that lasts 7 seconds, then it is natural to be caching. In general, the point is that it all depends on the scale and load ... - Zowie
  • Well then, if you actively continue to develop the project, then IMHO will better focus on exactly this ... With optimization, with a competent code and database structure, you will always have time to figure it out ... - Zowie
  • So it makes sense. And there is somewhere statistics where the load shows the site and speed, for which the cycle, function or operator is responsible. Or is there any script or plugin that shows in my code what it loads? Only except html, img, css, js. - Node_pro pm
  • Use php debuggers of the xdebug type code ... <br> By the way, why did you decide that there was a sense, if not a secret? - Zowie
  • So as I see the popularity is growing, and why not immediately do) - Node_pro

1 answer 1

Cache is good only for displaying large information which is not very often updated, for everything relatively, the difference in speed and performance is not significant. Thanks for the comments.