Clearing the cache could be done in a service. This way, we only have to call the service in here. This will also make it easier to remove cache from other PHP scripts in Fork.