[solved] Viewcache issue

[solved] Viewcache issue

Friday 22 July 2005 2:37:59 am - 5 replies

Modified on Monday 25 July 2005 3:05:03 am by Tristan Rivoallan

Author Message

Łukasz Serwatka

Friday 22 July 2005 4:08:02 am

Hi Tristan,

Look at this article
http://ez.no/products/ez_publish_cms/documentation/incoming/how_to_set_cache_expire_time_or_disable_cache_in_template

and

http://ez.no/products/ez_publish_cms/documentation/development/kernel/cache_block_optimization

Makre sure that $user_uid has correct value.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Tristan Rivoallan

Friday 22 July 2005 5:54:43 am

Thanx for answering.
I already read (and read again) these articles.

> Look at this article
> http://ez.no/products/ez_publish_...re_time_or_disable_cache_in_template

If I set cache_ttl to 0, it works but then there's no more caching so that is pretty useless ;)

> http://ez.no/products/ez_publish_...ment/kernel/cache_block_optimization

> Make sure that $user_uid has correct value.

I thought for a long time that this was the problem. But now that I am sure that the value is correct, the problem persists :(
I set this value with

{ezhttp('id_partenaire', 'session')}

. Can this be a problem ?

Using cache blocks looks pretty straightforward as long as you are sure of key uniqueness. I'm now 100% sure that keys are unique, but i'm still having trouble.

I'll continue looking for a solution

Łukasz Serwatka

Friday 22 July 2005 6:36:10 am

Have you tried without cache-blocks?

Try also with this code:

{def $current_user=fetch( 'user', 'current_user' )}

{cache-block keys=$current_user.contentobject_id}
    Private content
{/cache-block}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Konrad Mazurkiewicz

Friday 22 July 2005 7:46:37 am

Hi,
if your cache-block is in class view template only way is to disable cache for whole template.

Look at thread where it is clarified:
http://ez.no/community/forum/developer/viewcaching_and_cache_block_when_to_use

Konrad

Tristan Rivoallan

Monday 25 July 2005 3:04:44 am

WOUHOU! it works.

thanx for the clarification, for me cache-blocks and view cache where the same thing.

so the trick was to disable view caching and enabling cache blocks.

i'm now looking for a way to pregenerate cache after every change of data in the db. See you in another thread...

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.