fix: add cache clearing tools (#3896)

Forgot to add these in #3867
This commit is contained in:
Dag 2024-01-17 20:10:32 +01:00 committed by GitHub
parent 191e5b0493
commit 6eaf0eaa56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 1 deletions

1
.gitignore vendored
View file

@ -6,7 +6,6 @@ data/
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak

14
bin/cache-clear Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env php
<?php
/**
* Remove all items from the cache
*/
require __DIR__ . '/../lib/bootstrap.php';
$rssBridge = new RssBridge();
$cache = RssBridge::getCache();
$cache->clear();

14
bin/cache-prune Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env php
<?php
/**
* Remove all expired items from the cache
*/
require __DIR__ . '/../lib/bootstrap.php';
$rssBridge = new RssBridge();
$cache = RssBridge::getCache();
$cache->prune();