Cache wont clear in 3.2

Author Message

James Ward

Thursday 18 September 2003 3:04:09 pm

My clear cache buttons do not seem to be working in 3.2. If I change a template I have to manually go and delete all the folders in var/en/cache/template-block (my sitedesign is called en).

Anyone else running into these sorts of problems?

working at www.wardnet.com
blogging at www.jamesward.ca

Tore Skobba

Thursday 18 September 2003 3:45:25 pm

I think I have sort of the same problem here. I have Windows XP running the latest install packeage for Ez Publiz 3.2 (first release). I started with editing the page_layout, changes to that seemed to migrate quickly to the site, moved on to change parts of it, like left_menu.tpl.. Then my changes took ages to be migrated to the site. Basically it took so long time that it is not feasible to develop in that enviroment.

Might this be due to that I am using the Win installer including (Apache, Php and Mysql)? Could it work better if manually installing all parts and then installing Ez code?

Could rewritting the clear cache sh script (in the Ez bin folder) to an Windows batch file solve it, then run that after changes?

Primarily my question is if it is possible to develop on Windows? Or should I use Linux (Unfortunately my job provided me with a new computer which Linux Red Hat 9.0 does no support:(can't find SATA harddisk).

What should be my options here? Hope someone can give me some advice, primarily on the feasiblity of developing on Windows (then release on a Linux server of course :).

Cheers

By the way thanks for a good product, however the manuall really needs some work. Biggest drawback of Ez is the lack of documentation and community tutorials I think, anyone have any good links ?

Sandra Parente

Friday 19 September 2003 1:16:12 am

I have installed 3.2 on Red Hat and I also have these problems with the template cache. I think the reason is that in this new version there are two different chaches for template, /template and /template-blocks: probably the clear cache button clears only one cache and not both.
The problem is not so huge because after a few minutes suddenly the right templates appear: I think it's the cronjob that refreshes everything...

Sandra Parente
www.netbliss.it

liu spider

Friday 19 September 2003 5:13:50 am

just remove those cache directories, and your modification will take effect immediately

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

Hans Melis

Monday 22 September 2003 2:56:59 am

The reason why it won't clear the template cache dirs is because the ez crew forgot one little detail :)

Prior to ezp 3.2, everything used the same cache dirs. But in 3.2, the cache dirs have been split up so that each package (aka siteaccess?) has its own cache dir.

The "Clear template cache" button still works, but not with the new cache structure. The button is still locked up in the hard-coded cache dirs (var/cache/template/, etc.)

EDIT: The "Clear view cache" has been updated in 3.2. The modification is fairly straightforward. Use eZSys::cacheDirectory() as prefix and then concatenate with: /template/, /template-block/ and /override/

Just have a look in kernel/setup/cache.php and you can make the changes yourself until the ez crew fixes it.

--
H

Hans
http://blog.hansmelis.be

Hans Melis

Monday 22 September 2003 4:35:45 am

If you want a fix right now, here's what to do:

1) Open the file kernel/setup/cache.php

2) Look for this code:
if ( $module->isCurrentAction( 'ClearTemplateCache' ) )
{
$cachedDir = "var/cache/template/";
eZDir::recursiveDelete( $cachedDir );
$cachedDir = "var/cache/override/";
eZDir::recursiveDelete( $cachedDir );
$cachedDir = "var/cache/template-block/";
eZDir::recursiveDelete( $cachedDir );
$templateCacheCleared = true;
}

3) Replace it with:
if ( $module->isCurrentAction( 'ClearTemplateCache' ) )
{
$cacheSubDirs = array( '/template/', '/template-block/', '/override/' );

foreach( $cacheSubDirs as $cacheSubDir )
{
eZDir::recursiveDelete( eZSys::cacheDirectory() . $cacheSubDir );
}
$templateCacheCleared = true;
}

Hans
http://blog.hansmelis.be

Jan Borsodi

Monday 22 September 2003 5:10:43 am

We've added the fix to the stable and trunk (also ini clearing). Thanks for letting us know.

The fix will be part of the second 3.2 release and 3.3.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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