eZ Community » Forums » General » Caching and search
expandshrink

Caching and search

Caching and search

Wednesday 10 December 2003 11:48:23 am - 3 replies

The search won't work on my public site which of course is cached with cache-blocks in pagelayout.tpl (not around the {$module_result.content} though). Search works fine in admin siteaccess..

Anyone else had the same problem?

Also I've used cache-blocks in article.tpl.. Could this be a problem?

------------------
Bug cache-block: either admin or search won't work started by Bård Farstad
Started bugs: First Previous Next Last Back to list

There's a strange problem with the {cache-block} element.
When TemplateCache is enabled in site.ini (thus making cache-block actually work) the search engine won't work, that is, it will work the firs time, and then always show the same search results.
On the other hand, when I disabled TemplateCache, I couldn't create new content objects in the admin interface. After I click create new, it will show a blank page.

Workaround: remove all {cache-block} in pagelayout.tpl

---- Correctly used? by Bård Farstad (02/12/2003 9:11 am) ----

How was the cache block used?

It sounds like you have a cache block around the:
{$module_result.content}
This will not work since dynamic content is returned from this variable. A pagelayout with cache block can look something like this:

{cache-block}
... menues / navigation
{/cache-block}
{$module_result.content}
{cache-block}
... footer / navigation
{/cache-block}

Was this in any of the eZ publish packages?

---- Started by Bård Farstad (02/12/2003 9:17 am) ----

---- Similar problem in 3.2-2 by Valentin Svelland (10/12/2003 11:44 am) ----

The search on my public site doesn't work. The pagelayout.tpl is cached with cache-blocks (not the {$module_result.content}). When I do the same search in admin siteaccess it works fine.

I'm also using cache-blocks in article.tpl - could this be the problem?

Modified on Wednesday 10 December 2003 11:50:53 am by Valentin Svelland

Wednesday 10 December 2003 4:27:58 pm

Found out that search works again when site.ini.append.php's template cache is disabled: TemplateCache=disabled

But I guess my site runs slower with this cache disabled, so I'm not quite sure what to do...

Thursday 11 December 2003 7:09:33 am

I had a similar problem with caching and results from folder lists on the several pagelayout pages - I added several keys values ie:

{cache-block keys=array( edca_homepage, $module_result.node_id}
....
{/cache-block}

which fixed the problem quite nicely. Parts of the search keywords as the key but I don't know how useful that would be cause they'll vary (then again they may not - if people generally search for the same things it'll make things nice and quick).

- Nathaniel

Modified on Thursday 11 December 2003 7:25:48 am by Nathaniel Fitzgerald-Hood

Thursday 11 December 2003 9:21:01 am

Thanks for your answer.

I'm sure this could work, and I guess I'll try it out - but I can't understand why these keys should be necessary as the {$module_result.content} is outside my cache-blocks..

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from