Forums / Install & configuration / static cache - makestaticcaching.php doesn't create anything

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

eZ debug

Timing: Jan 19 2025 07:15:55
Script start
Timing: Jan 19 2025 07:15:55
Module start 'content'
Timing: Jan 19 2025 07:15:55
Module end 'content'
Timing: Jan 19 2025 07:15:55
Script end

Main resources:

Total runtime0.3285 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.3125180.7891
Module start 'content' 0.00590.0046 770.101694.1328
Module end 'content' 0.01050.3179 864.2344529.4531
Script end 0.3284  1,393.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.0945200.0002
Check MTime0.00140.4259200.0001
Mysql Total
Database connection0.00080.234710.0008
Mysqli_queries0.282786.05731410.0020
Looping result0.00140.42051390.0000
Template Total0.317496.610.3174
Template load0.00080.242610.0008
Template processing0.316696.375810.3166
Override
Cache load0.00050.165810.0005
Sytem overhead
Fetch class attribute can translate value0.00080.247510.0008
XML
Image XML parsing0.00020.064510.0002
General
dbfile0.00170.5141200.0001
String conversion0.00000.001730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs