芝麻web文件管理V1.00
编辑当前文件:/home/mybf1/www/pati.bf1.my/wp-content/plugins/spotlight-social-photo-feeds/modules/NewsModule.php
get('cache'); try { $cache->clear(); } catch (CacheException $e) { // Fail silently } }); } /** * @inheritDoc * * @since 0.2 */ public function getFactories(): array { return [ // The HTTP client to use to fetch news 'client' => new Factory(['client/base_url', 'client/options'], function ($url, $options) { return WpClient::createDefault(new Uri($url), $options); }), // The base URL for the HTTP client 'client/base_url' => new StringService('{0}/news', ['@saas/server/base_url']), // The options for the HTTP client 'client/options' => new Value(['timeout' => 10]), // The cache where to store cached responses from the server (15 minute TTL) 'cache' => new Factory(['@wp/db',], function (wpdb $wpdb) { return new CachePool($wpdb, 'sli_news', uniqid('sli_news'), 15 * 60); }), // The notification provider 'provider' => new Constructor(NewsNotificationProvider::class, ['client', 'cache']), ]; } /** * @inheritDoc * * @since 0.2 */ public function getExtensions(): array { return [ // Register the provider 'notifications/providers' => new ArrayExtension(['provider']), ]; } }