src/Tus/Server.php
public function handleExpiration() : array
    {
        $deleted   = [];
        $cacheKeys = $this->cache->keys();

        foreach ($cacheKeys as $key) {
            $fileMeta = $this->cache->get($key, true);

            if ( ! $this->isExpired($fileMeta)) {
                continue;
            }

            if ( ! $this->cache->delete($key)) {
                continue;
            }

            if (is_writable($fileMeta['file_path'])) {
                unlink($fileMeta['file_path']);
            }

            $deleted[] = $fileMeta;
        }

        return $deleted;
    }
public function handleExpiration() : array
    {
        $deleted   = [];
        $cacheKeys = $this->cache->keys();

        foreach ($cacheKeys as $key) {
            $fileMeta = $this->cache->get($key, true);

            if ( ! $this->isExpired($fileMeta)) {
                continue;
            }

            if ( ! $this->cache->delete($key)) {
                continue;
            }

            if (is_writable($fileMeta['file_path'])) {
                unlink($fileMeta['file_path']);
            }

            $deleted[] = $fileMeta;
        }

        return $deleted;
    }
public function handleExpiration ( ) : array { $ deleted = [ ] ; $ cacheKeys = $ this -> cache -> keys ( ) ; foreach ( $ cacheKeys as $ key ) { $ fileMeta = $ this -> cache -> get ( $ key , true ) ; if ( ! $ this -> isExpired ( $ fileMeta ) ) { continue ; } if ( ! $ this -> cache -> delete ( $ key ) ) { continue ; } if ( is_writable ( $ fileMeta [ 'file_path' ] ) ) { unlink ( $ fileMeta [ 'file_path' ] ) ; } $ deleted [ ] = $ fileMeta ; } return $ deleted ; }
Delete expired resources.

@return array
Delete expired resources .