Answer the question
In order to leave comments, you need to log in
What is the best way to do caching?
In general, I need to cache (to be honest, I don’t know how to say it right) the header, but there are a couple of places in it where the number of articles is displayed, using php + mysql. Templates are stored in a separate file and I don’t know how to cache, now I will explain in more detail, but first an example, to interfere with your imagination :)
<html>
<div class = 'menu'>
<a href = '/news'>Новости</a>
<a href = '/article'>Статьи(на сайте <?php $data->articleNumber; ?> статей)</a>
</div>
</html>
Answer the question
In order to leave comments, you need to log in
Oh ... Read, for example, what features Yii provides.
www.yiiframework.com/doc/guide/1.1/ru/caching.overview
In your case, query caching in conjunction with dynamic content caching is suitable.
I hope you understand at least the ideology of how to mold all this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question