Forums / Developer / How can clear the cache of the site every two hours

How can clear the cache of the site every two hours

Author Message

Jorge estévez

Wednesday 17 December 2008 10:23:22 pm

Hello,

How can I clear the cache of the site every two hours... Cronjobs? How?

Thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Stéphane Bullier

Thursday 18 December 2008 12:18:55 am

Hello,

Yes, you have to use the cronjob. Look here : http://ez.no/doc/ez_publish/technical_manual/4_0/features/cronjobs

On Unix system, after crontab -e :

# The path to the eZ Publish directory.
EZPUBLISH=/var/www/ezpublish
 
# Location of the PHP command line interface binary.
PHPCLI=/usr/local/bin/php

* 02 * * * cd $EZPUBLISH && $PHPCLI bin/php/ezcache.php --clear-<option> -q -s example 2>&1

Try this command in your console first to see all options :

php bin/php/ezcache.php -h

Stéphane