app/Http/Middleware/DoHousekeeping.php
private function runHousekeeping(): void
    {
        $data_filesystem = app(FilesystemInterface::class);
        $root_filesystem = new Filesystem(new Local(Webtrees::ROOT_DIR));

        // Clear files in the (user-specified) data folder - which might not be local files
        $this->housekeeping_service->deleteOldFiles($data_filesystem, 'cache', self::MAX_CACHE_AGE);

        $this->housekeeping_service->deleteOldFiles($data_filesystem, 'thumbnail-cache', self::MAX_THUMBNAIL_AGE);

        // Clear files in /data - which need to be local files
        $this->housekeeping_service->deleteOldFiles($root_filesystem, self::TMP_DIR, self::MAX_TMP_FILE_AGE);

        // Clear entries in database tables
        $this->housekeeping_service->deleteOldLogs(self::MAX_LOG_AGE);

        $this->housekeeping_service->deleteOldSessions(self::MAX_SESSION_AGE);
    }
private function runHousekeeping(): void
    {
        $data_filesystem = app(FilesystemInterface::class);
        $root_filesystem = new Filesystem(new Local(Webtrees::ROOT_DIR));

        // Clear files in the (user-specified) data folder - which might not be local files
        $this->housekeeping_service->deleteOldFiles($data_filesystem, 'cache', self::MAX_CACHE_AGE);

        $this->housekeeping_service->deleteOldFiles($data_filesystem, 'thumbnail-cache', self::MAX_THUMBNAIL_AGE);

        // Clear files in /data - which need to be local files
        $this->housekeeping_service->deleteOldFiles($root_filesystem, self::TMP_DIR, self::MAX_TMP_FILE_AGE);

        // Clear entries in database tables
        $this->housekeeping_service->deleteOldLogs(self::MAX_LOG_AGE);

        $this->housekeeping_service->deleteOldSessions(self::MAX_SESSION_AGE);
    }
private function runHousekeeping ( ) : void { $ data_filesystem = app ( FilesystemInterface :: class ) ; $ root_filesystem = new Filesystem ( new Local ( Webtrees :: ROOT_DIR ) ) ; // Clear files in the (user-specified) data folder - which might not be local files $ this -> housekeeping_service -> deleteOldFiles ( $ data_filesystem , 'cache' , self :: MAX_CACHE_AGE ) ; $ this -> housekeeping_service -> deleteOldFiles ( $ data_filesystem , 'thumbnail-cache' , self :: MAX_THUMBNAIL_AGE ) ; // Clear files in /data - which need to be local files $ this -> housekeeping_service -> deleteOldFiles ( $ root_filesystem , self :: TMP_DIR , self :: MAX_TMP_FILE_AGE ) ; // Clear entries in database tables $ this -> housekeeping_service -> deleteOldLogs ( self :: MAX_LOG_AGE ) ; $ this -> housekeeping_service -> deleteOldSessions ( self :: MAX_SESSION_AGE ) ; }
Run the various housekeeping services.

@return void
Run the various housekeeping services .