How to cache sidebar blocks in XF 1.1.5?

puppi

New member
Hi guys,
I'd like to cache two blocks (Online users and Recent posts) for something like 2 minutes. If it is possible, how can I do that?
My apologises if this question being asked before.
 
Also, Recent Posts isn't a default sidebar block.

So maybe that's from an add-on?

One add-on worth a look is Widget Framework. It includes a number of sidebar blocks and they all have a caching mechanism built in.
 
@Mike, isn't caching settins included in XF 1.2?
Where can I get guidelines about implementing cache on certain blocks? (I know some PHP but nothing about Zend framework)

@Chris. That's right. it is a non-free addon.
 
All sorts of stuff is already cached regardless of the version. There's many ways to cache things. But you still need to code a way to fetch data from the cache, write it to the cache etc.
 
I currently just save the serialized database results in a .txt file. Then on each page load I check the modification date on the text file, and if it's older than X seconds, I update it. Then the data is pulled from that file and pushed to the template. Right now I'm using this same method to display the latest threads and the threads with the most replies. It may not be ideal, but it works fine for me. :)
 
I currently just save the serialized database results in a .txt file. Then on each page load I check the modification date on the text file, and if it's older than X seconds, I update it. Then the data is pulled from that file and pushed to the template. Right now I'm using this same method to display the latest threads and the threads with the most replies. It may not be ideal, but it works fine for me. :)

A forum that rely on this sort of solutions can not be called a mature forum engine. A mature forum does not assume that users have any knowledge of php.
I just left for VB mainly because of this, and also because the lack of regexp post filtering.
I may come back to XF when it offers these basic functionalities out of the box.
 
Top Bottom