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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 Exponential directory.
Exponential=/var/www/Exponential
 
# Location of the PHP command line interface binary.
PHPCLI=/usr/local/bin/php

* 02 * * * cd $Exponential && $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