找回密碼
 註冊
搜索
查看: 2822|回復: 0

Joomla 定時自動清除快取

[複製鏈接]
發表於 2018-1-31 09:32:55 | 顯示全部樓層 |閱讀模式
如果是使用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/howt ... using-command-line/
Cleaning cache with cron job
https://forum.joomla.org/viewtopic.php?t=480309
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-4-20 02:43 , Processed in 0.015044 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表