Cache/caching of data in each block

Hi,

on my site I have some custom blocks, which load much data, for example statistics. To calculate the statistics I have to do complex database queries and php cycles on all data extracted. I would like to know if there is a standard way in boonex to cache the data of a block (example saving it to html) and deciding when the block should be recalculated (example every 10 seconds).

This will save a lot of calculations. The best would be to have it as standard option on each "block".

Now while I was writing this post I checked the best place to have this option, and ... I found in sys_page_compose there is actually a "cache" column ! Also there is a cache box in the page composer UI!

Is that option doing what I want by caching also the data or only the template? In other words will that avoid calling getBlockCode_<my function>() until the cache value is passed?

Please note that a block can contain data specific to one user, so it should be cached "per user" and not be identical for all users.

Thanks.

Quote · 28 Feb 2014

Yes, there is already cache exactly for this purpose, but the problem that it will NOT cache the block per user, so it make sense to use it only for pages like homepage for example.

Rules → http://www.boonex.com/terms
Quote · 4 Mar 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.