0

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?

Anne Droid
  • 3,151
  • 4
  • 16
  • 15

3 Answers3

2

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.

enter image description here

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

avarx
  • 509
  • 5
  • 21
1

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.

maxhb
  • 8,554
  • 9
  • 29
  • 53
0

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).

sven
  • 609
  • 5
  • 14
  • If it needs to be a cron task with no extra code / extension you could also use the extbase cli. This is used for example by TYPO3 surf: https://github.com/TYPO3-Surf-CMS/Surf.CMS/blob/master/Packages/Application/TYPO3.Surf.CMS/Classes/TYPO3/Surf/CMS/Task/TYPO3/CMS/FlushCachesTask.php – sven Mar 07 '16 at 10:18