static cache - makestaticcaching.php doesn't create anything

Author Message

Erik Streb

Saturday 16 July 2005 6:01:28 am

Hello.

I used this manual ( http://ez.no/ez_publish/download/changelogs/ez_publish_3_6/new_features/static_caching_of_content ) to activate static caching.

I have two languages (en, de).
When I execute this command

php bin/php/makestaticcache.php -f

or this

php bin/php/makestaticcache.php -s de

nothing happens in the static/de and static/en directories. They stay empty.

My configuration files look like this:
I added

[ContentSettings]
StaticCache=enabled

to /home/DOMAIN/ezpublish/settings/override/site.ini.append.php

/home/DOMAIN/ezpublish/settings/override/staticcache.ini.append.php

<?php /* #?ini charset="iso-8859-1"?

[CacheSettings]
HostName=localhost
MaxCacheDepth=4

# A list of url's to cache
CachedURLArray[]
CachedURLArray[]=/*
#CachedURLArray[]=/news*
#CachedURLArray[]=/products*

CachedSiteAccesses[]
CachedSiteAccesses[]=de
CachedSiteAccesses[]=en
*/ ?>

For every siteaccess (example en) this:
/home/DOMAIN/ezpublish/settings/siteaccess/en/staticcache.ini.append.php

<?php /* #?ini charset="iso-8859-1"?

[CacheSettings]
StaticStorageDir=static/en
*/ ?>

And finally this is my /etc/apache2/vhosts.d/DOMAIN.com.conf

<VirtualHost {IP}:80>
  ServerName www.DOMAIN.de
  ServerAlias www.DOMAIN2.com
  DocumentRoot /home/DOMAIN/ezpublish
  ScriptAlias /cgi-bin/ /home/DOMAIN/cgi-bin/
  php_admin_value open_basedir /home/DOMAIN/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/DOMAIN/phptmp/

RewriteEngine On
RewriteRule !(^/Software|^/share|^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf|exe|txt|zip)$ /index.php


# Anfang von Static Caching für eZpublish ---
#RewriteLog    /tmp/rewrite.log
RewriteLogLevel 4

RewriteCond   /home/DOMAIN/ezpublish/static/de/index.html -f
RewriteRule  ^/$              /static/de/index.html [L]
RewriteCond   /home/DOMAIN/ezpublish/static/de/index.html -f
RewriteRule  ^$               /static/de/index.html [L]

RewriteCond   /home/DOMAIN/ezpublish/static/en/index.html -f
RewriteRule  ^/$              /static/en/index.html [L]
RewriteCond   /home/DOMAIN/ezpublish/static/en/index.html -f
RewriteRule  ^$               /static/en/index.html [L]

RewriteCond   %{REQUEST_METHOD}       !^POST$
RewriteCond   /home/DOMAIN/ezpublish/static$1/index.html -f
RewriteRule   ^(.*)$  /static$1/index.html [L]

RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php
# Ende von Static Caching für eZpublish ---
</VirtualHost>

And of course I created the directories /home/DOMAIN/ezpublish/static/de and /home/DOMAIN/ezpublish/static/en

What could be the problem?

Łukasz Serwatka

Sunday 17 July 2005 2:19:09 am

Try this steps:

1. Remove staticcache.ini.append.php for siteaccesses
2. Add in to override staticcache.ini.append.php file

[CacheSettings]
StaticStorageDir=static

3. Try again

eZ publish should create static cache for every siteaccess in folders

static/en <-siteaccess name
static/de <-siteaccess name

And make sure that you using eZ pub version from SVN.

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

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

eZ debug

Timing: Jan 19 2025 01:17:18
Script start
Timing: Jan 19 2025 01:17:18
Module start 'layout'
Timing: Jan 19 2025 01:17:18
Module start 'content'
Timing: Jan 19 2025 01:17:20
Module end 'content'
Timing: Jan 19 2025 01:17:20
Script end

Main resources:

Total runtime1.3372 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.6406152.6875
Module start 'layout' 0.00520.0027 742.328139.5078
Module start 'content' 0.00791.3270 781.8359553.4922
Module end 'content' 1.33490.0022 1,335.328112.0938
Script end 1.3371  1,347.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3193160.0003
Check MTime0.00160.1193160.0001
Mysql Total
Database connection0.00060.046710.0006
Mysqli_queries1.268594.8652540.0235
Looping result0.00060.0456520.0000
Template Total1.297997.120.6490
Template load0.00290.218020.0015
Template processing1.295096.846620.6475
Template load and register function0.00020.016310.0002
states
state_id_array0.00080.060810.0008
state_identifier_array0.00160.121720.0008
Override
Cache load0.00260.1971370.0001
Sytem overhead
Fetch class attribute can translate value0.00060.044620.0003
Fetch class attribute name0.00180.131940.0004
XML
Image XML parsing0.00770.574320.0038
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00770.5737240.0003
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0005 secs