aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-15 17:31:49 -0700
committerFriendika <info@friendika.com>2011-03-15 17:31:49 -0700
commitf01538a54f68c172e09aabed90e2651ca2305675 (patch)
tree69ca84f95663c93d098be91047f55daa31a12106 /include/poller.php
parent73d3758e45f2049ad669225910afeb0d24e25e86 (diff)
downloadvolse-hubzilla-f01538a54f68c172e09aabed90e2651ca2305675.tar.gz
volse-hubzilla-f01538a54f68c172e09aabed90e2651ca2305675.tar.bz2
volse-hubzilla-f01538a54f68c172e09aabed90e2651ca2305675.zip
content expiration
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php
index a093190a6..8619697d9 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -29,6 +29,17 @@ function poller_run($argv, $argc){
proc_run('php',"include/queue.php");
+ // once daily run expire in background
+
+ $d1 = get_config('system','last_expire_day');
+ $d2 = intval(datetime_convert('UTC','UTC','now','d'));
+
+ if($d2 != intval($d1)) {
+ set_config('system','last_expire_day',$d2);
+ proc_run('php','include/expire.php');
+ }
+
+
// clear old cache
q("DELETE FROM `cache` WHERE `updated` < '%s'",
dbesc(datetime_convert('UTC','UTC',"now - 30 days")));