Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!
Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!
Joomla позволяет кешировать отдельные части шаблонов, компонентов, а именно их вывод. Для этого необходимо создать объект кеша с обработчиком "output", так как показано
Создается кеш-объект c обработчиком "output". "com_test" в данном случае - это место хранения кеша: /cache/com_test ( в случае файлового кеша)
Далее выбирается идентификатор кеширования. Он должен зависеть например от внешних условий расширения. Таким образом для разных страниц, с разными Itemid будет создаваться разный кеш и не будет путаницы. В принципе можно подставлять сериализованые массивы с текущими параметрами вызова и прочее. Хорошим вариантом можно считать следующий вариант:
Таким образом обновление произойдет автоматический сброс при изменении элемента администратором сайта.
Внимание: Будте осторожны с выбором идентификатора кеша. Например использование следующих вариантов грозит резким ростом размера кеша, особенно на больших сайтах с высокой посещаемостью. Эффективность кеширования пойдет к нулю, более того в какой-то мере это можно считать дырой в безопасности сайта.
Далее начинаем непосредственный перехват вывода. Если файл кеша отсутствует или истек период его жизни, то функция start() вернет "false", в противном случае функция вернет "true".
В случае просроченного/отсутсвующего кеша - запуститься буферизация вывода. Заканчивается буферизация после выполнения end(). Если start() вернул "true", будет использован тот текст, который хранился с прошлого раза в файлах кеша.
Спасибо очень полезно
Возможно ли как то исключить из кеширования определенный компонент или модуль при включенном стандартном кеше и стандартном плагине Система ->Кеш?
Dear joomla-book.ru webmaster, Thanks for the well-written and informative post!
We absolutely love your blog and find almost all of your post's to be just what I'm looking for.
Would you offer guest writers to write content for you? I wouldn't mind
creating a post or elaborating on a lot of the subjects
you write related to here. Again, awesome web log!
casino en ligne fiable
I am sure this paragraph has touched all the internet
viewers, its really really good post on building up new weblog.
casino en ligne fiable
I was very happy to discover this site. I wanted to thank you
for your time for this wonderful read!! I definitely enjoyed every little bit of it and i also have you bookmarked to look at new information on your website.
casino en ligne
That is really attention-grabbing, You are an overly skilled blogger.
I've joined your rss feed and sit up for
in quest of extra of your magnificent post. Additionally, I've shared your website in my social networks
casino en ligne fiable
Thankfulness to my father who stated to me about this website,
this weblog is really amazing.
casino en ligne
I think this is one of the most vital information for me.
And i'm glad reading your article. But wanna remark
on some general things, The website style is wonderful, the articles is really excellent :
D. Good job, cheers
casino en ligne francais
Hey there! I simply wish to give you a huge thumbs up for the great info you have right here
on this post. I am returning to your website for more soon.
casino en ligne
Yes! Finally someone writes about sss.
casino en ligne France
Hey, I think your blog might be having browser compatibility issues.
When I look at your blog site in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up! Other then that, wonderful blog!
casino en ligne
Fastidious answer back in return of this issue
with real arguments and telling everything on the topic of that.
casino en ligne francais