if(is_null($db)) {
@include(".htconfig.php");
- require_once("dba.php");
+ require_once("include/dba.php");
$db = new dba($db_host, $db_user, $db_pass, $db_data);
unset($db_host, $db_user, $db_pass, $db_data);
};
proc_run('php',"include/queue.php");
+ // run diaspora photo queue process in the background
+
+ proc_run('php',"include/dsprphotoq.php");
+
// expire any expired accounts
q("UPDATE user SET `account_expired` = 1 where `account_expired` = 0
proc_run('php','include/expire.php');
}
- // clear old cache
- Cache::clear();
+ $last = get_config('system','cache_last_cleared');
+
+ if($last) {
+ $next = $last + (3600); // Once per hour
+ $clear_cache = ($next <= time());
+ } else
+ $clear_cache = true;
- // clear old item cache files
- clear_cache();
+ if ($clear_cache) {
+ // clear old cache
+ Cache::clear();
- // clear cache for photos
- clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
+ // clear old item cache files
+ clear_cache();
+
+ // clear cache for photos
+ clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
+
+ set_config('system','cache_last_cleared', time());
+ }
$manual_id = 0;
$generation = 0;