eZ Community » Forums » Developer » Search Cache problem
expandshrink

Search Cache problem

Search Cache problem

Friday 27 April 2007 10:09:29 am - 7 replies

Hello,

I have a problem with my new Installation of Ez publish (3.9.1).

I search a word "blabla" in the search engine, the result is correct. After if i search "hello", the search engine replace "hello" by "blabla".

When i had disabled the cache in site.ini.append.php, i dont see this problem.

I test this:

{set-block scope=root variable=cache_ttl}0{/set-block} 
			{cache-block}
			<!-- Debut contenu noeud -->
				<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
				      {$module_result.content}
				</table> 
			<!-- Fin contenu noeud -->
			{/cache-block}

and

			{cache-block expiry=1}
			<!-- Debut contenu noeud -->
				<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
				      {$module_result.content}
				</table> 
			<!-- Fin contenu noeud -->
			{/cache-block}

but it doesnt work.

How can i repair this problem?

Thanks

Modified on Friday 27 April 2007 10:09:58 am by Julien Plesniak

Thursday 03 May 2007 6:16:36 pm

Hi Julien

I would recommend you to add uri_string to your cache block in order to make unique cache based on the URI. My working code looks like this:

{cache-block keys=array($uri_string, $user_hash, $access_type.name)}
{$module_result.content}
{/cache-block}

Good luck happy.gif Emoticon

Friday 04 May 2007 8:50:05 am

Hello thanks for your help but this solution doesn't repair my problem sad.gif Emoticon

Friday 04 May 2007 9:29:27 am

I'm guessing that the code your are showing here is from pgalayout.tpl, in that case:

Why are you wrapping modul_result.content inside a cache block ?
veiw_cache is the cache that handles the caching of modul_result.content, so you don't need a cache block around it. So remove the cache block and try again.

And this line:
{set-block scope=root variable=cache_ttl}0{/set-block}
Is supposed to be used inside node / system templates to turn of view cache for that specific page. Node / system templates are the one generating $modul_result.content, you can read more about it in the doc.

Friday 04 May 2007 10:04:14 am

Hi

I'm familiar with the {set-block scope=root variable=cache_ttl}0{/set-block} setting that been working fine until I started to work with ezwebin in 3.9.0, here it looked like this setting are ignored by the default templates. I gave up and found the pagelayout.tpl cache to be a workaround for my problem, that were not directly related to the search functionality.

Anyway, sorry for giving a suggestion that's not working.

Thursday 17 May 2007 10:41:40 am

Hi !

i have exactly the same problem.
i've already tried many ways
{set-block scope=root variable=cache_ttl}0{/set-block} doesn't work ( or i dont know how to use it)

if i disable the cache, it's working fine

if i use the original pagelayout.tpl (from ezwebin extension), it's working fine
but i cannot find the difference between this one and mine....

my version of ezp is 3.9.1
with the 3.9.2, same issue

So Julien, have you fix your problem ?

thanks !

Monday 21 May 2007 8:17:35 am

Hello,

No i haven't fix my problem sad.gif Emoticon

Monday 02 July 2007 2:52:04 pm

someone have a new idea?

thanks

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from