Refresh Typo3 by web server cron job

别等时光非礼了梦想. 提交于 2019-12-25 07:08:04

问题


Is it possible to force Typo3 to refresh websites by an external trigger (e.g. web server cron job or manual trigger)? Could you please describe some best practices?


回答1:


Please have a look at Scheduler.

The Scheduler is designed to be the central place to manage all kind of tasks that need to be executed on a regular basis, without needing someone to actually press a button.

If no existing task fits your needs, you can create an own task.




回答2:


If refreshing means recreating the frontend cache then you could use

config.cache_clearAtMidnight = 1

This will invalidate all FE-Cache entries at midnight, see https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#cache-clearatmidnight for documentation.




回答3:


If you need to clear the Front End cache, due to external changes to content or whatever, you could use the cache manager from the system extensions and build a small swapper extension to clear specific or all page caches. To go through the framework, you would add a task that can be inserted into the planner in the back end. The planner then would be called by a cron job.

I remember an existing extension for that but I don't remember the exact name right now. However, setting a new one up only requires little code (and helps immensely understanding the caching mechanism).



来源:https://stackoverflow.com/questions/35821058/refresh-typo3-by-web-server-cron-job

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!