If you allow visitors to create own user-accounts and you have elements which are changed dynamically based on the current user and other rules you have to create many cache-blocks to get the desired output. So the system creates a huge amount of cache-block files.
In most cases, around 80% to 90% of the visits of a site are produced by an 'anonymous user'.
So to speed up the caching, you can put something like this in your pagelayout.tpl:
{section show=$current_user.is_logged.in}
{cache-block keys=array('menu', ...)}
your code ...
{/cache-block}
{cache-block keys=array('user_information',...)}
your code ...
{/cache-block}
...
{section-else}
only one cache-block, because the content is the same for all users who are not logged in.
{cache-block keys=array('anonym',$uri_string)}
...
{/cache-block}
{/section}
cache-block, tip 2
Georg Franz
Friday 12 December 2003 4:18:46 pm
another tip for the cache-block usage:
If you allow visitors to create own user-accounts and you have elements which are changed dynamically based on the current user and other rules you have to create many cache-blocks to get the desired output. So the system creates a huge amount of cache-block files.
In most cases, around 80% to 90% of the visits of a site are produced by an 'anonymous user'.
So to speed up the caching, you can put something like this in your pagelayout.tpl:
{section show=$current_user.is_logged.in}
{cache-block keys=array('menu', ...)}
your code ...
{/cache-block}
{cache-block keys=array('user_information',...)}
your code ...
{/cache-block}
...
{section-else}
only one cache-block, because the content is the same for all users who are not logged in.
{cache-block keys=array('anonym',$uri_string)}
...
{/cache-block}
{/section}
Kind regards,
Emil.