. * */ namespace Friendica\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Photo; use Friendica\Util\Proxy as ProxyUtils; /** * Clear cache entries */ class ClearCache { public static function execute() { $a = DI::app(); // clear old cache DI::cache()->clear(); // Delete the cached OEmbed entries that are older than three month DBA::delete('oembed', ["`created` < NOW() - INTERVAL 3 MONTH"]); // Delete the cached "parsed_url" entries that are expired DBA::delete('parsed_url', ["`expires` < NOW()"]); } }