Static cache problem

Author Message

Łukasz Kęska

Tuesday 05 May 2009 3:21:53 am

Hi all

I have set the static cache in ezp project I built - everything seems to be running properly - html cache files are collected when I run makestaticcache.php from my terminal, but when I start the page, it is shown in standard way (page is generated thru php, not from static file). Why it doesn't work? It should be switched to html automatically after static cache generating, shouldn't it?

Lucas

Gaetano Giunta

Tuesday 05 May 2009 5:11:43 am

Did you set up proper rewrite rules in your webservers? Without those, the static html files generated by eZP cannot be served...

Principal Consultant International Business
Member of the Community Project Board

Łukasz Kęska

Tuesday 05 May 2009 6:04:35 am

yes, I have set it, here is the content of my htaccess file (looks a little bit messy, sorry) - chillizet is the name of the folder I keep my project in:

php_value allow_call_time_pass_reference 0

RewriteEngine On
RewriteBase /
RewriteRule ^/var/[^/]+/cache/public/.* - [L]

RewriteCond /var/www/chillizet/static/index.html -f
RewriteRule ^/$ /static/index.html [L]
RewriteCond /var/www/chillizet/static/index.html -f
RewriteRule ^$ /static/index.html [L]
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond /var/www/chillizet/static$1/index.html -f
RewriteRule ^(.*)$ /static$1/index.html [L]
RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php

RewriteRule ^.*externals/(.+)$ externals/$1 [L]

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|jar|swf|mp3|xml|flv)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

Rewriterule ^/extension/ezvideoflv/design/standard/flash/player.swf - [L]
RewriteRule !\.(gif|jpe?g|png|css|js|swf|mp3|flv|wav|wmv|html?)|stat(.*)|var(.+)storage.pdf(.+)\.pdf$ index.php

#DirectoryIndex index.php

#RewriteEngine On
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) webdav.php [L]

RewriteCond %{HTTP_HOST} ^soap\..*
RewriteRule ^(.*) soap.php [L]

RewriteRule ^var/cache/debug.html.* - [L]
RewriteRule ^var/[^/]+/cache/debug.html.* - [L]
Rewriterule ^var/storage/.* - [L]
Rewriterule ^var/[^/]+/storage/.* - [L]
RewriteRule ^var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/public/.* - [L]
RewriteRule ^var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^share/icons/.* - [L]
Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|javascripts?)/.* - [L]
Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]

RewriteRule .* index.php [L]

Łukasz Kęska

Wednesday 06 May 2009 12:54:06 am

would somebody be so nice and advice in this matter? :->

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 30 2025 21:38:04
Script start
Timing: Jan 30 2025 21:38:04
Module start 'layout'
Timing: Jan 30 2025 21:38:04
Module start 'content'
Timing: Jan 30 2025 21:38:04
Module end 'content'
Timing: Jan 30 2025 21:38:04
Script end

Main resources:

Total runtime0.0212 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.1328151.2109
Module start 'layout' 0.00490.0037 739.3438220.6875
Module start 'content' 0.00860.0109 960.03131,001.8047
Module end 'content' 0.01950.0017 1,961.835933.9922
Script end 0.0212  1,995.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.4664140.0002
Check MTime0.00115.1568140.0001
Mysql Total
Database connection0.00094.067010.0009
Mysqli_queries0.002110.011130.0007
Looping result0.00000.047210.0000
Template Total0.00125.710.0012
Template load0.00094.430310.0009
Template processing0.00031.264210.0003
Override
Cache load0.00063.024410.0006
General
dbfile0.00031.213680.0000
String conversion0.00000.029240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs