mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 09:35:28 +03:00
bb2f471a03
Have to tweak the config BEFORE instantiating of course
24 lines
559 B
PHP
Executable file
24 lines
559 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
/**
|
|
* Remove all expired items from the cache
|
|
*/
|
|
|
|
require __DIR__ . '/../lib/bootstrap.php';
|
|
require __DIR__ . '/../lib/config.php';
|
|
|
|
$container = require __DIR__ . '/../lib/dependencies.php';
|
|
|
|
if (
|
|
Configuration::getConfig('cache', 'type') === 'file'
|
|
&& !Configuration::getConfig('FileCache', 'enable_purge')
|
|
) {
|
|
// Override enable_purge for this particular execution
|
|
Configuration::setConfig('FileCache', 'enable_purge', true);
|
|
}
|
|
|
|
/** @var CacheInterface $cache */
|
|
$cache = $container['cache'];
|
|
|
|
$cache->prune();
|