Skip to content

Commit 6eaf0ea

Browse files
authored
fix: add cache clearing tools (RSS-Bridge#3896)
Forgot to add these in RSS-Bridge#3867
1 parent 191e5b0 commit 6eaf0ea

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ data/
66
*.pydevproject
77
.project
88
.metadata
9-
bin/
109
tmp/
1110
*.tmp
1211
*.bak

bin/cache-clear

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Remove all items from the cache
6+
*/
7+
8+
require __DIR__ . '/../lib/bootstrap.php';
9+
10+
$rssBridge = new RssBridge();
11+
12+
$cache = RssBridge::getCache();
13+
14+
$cache->clear();

bin/cache-prune

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Remove all expired items from the cache
6+
*/
7+
8+
require __DIR__ . '/../lib/bootstrap.php';
9+
10+
$rssBridge = new RssBridge();
11+
12+
$cache = RssBridge::getCache();
13+
14+
$cache->prune();

0 commit comments

Comments
 (0)