JDP 發表於 2018-1-31 09:32:55

Joomla 定時自動清除快取

如果是使用memcahed當cache,則先安裝nmap-ncat,於crontab加入
0 12 * * * echo 'flush_all' | nc localhost 11211 > /dev/null 2>&1

如果是使用file當cache,則於crontab加入
0 12 * * * find /www/joomla/cache/ -type f -exec rm {} \;

Reference:
HowTo: Flush Contents Of a Memcached Server Using Command Line
https://www.servernoobs.com/howto-flush-contents-of-a-memcached-server-using-command-line/
Cleaning cache with cron job
https://forum.joomla.org/viewtopic.php?t=480309
頁: [1]
查看完整版本: Joomla 定時自動清除快取