+ // clear cache for image proxy
+ if (!get_config("system", "proxy_disabled")) {
+ clear_cache($a->get_basepath(), $a->get_basepath()."/proxy");
+
+ $cachetime = get_config('system','proxy_cache_time');
+ if (!$cachetime) $cachetime = PROXY_DEFAULT_TIME;
+
+ q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
+ }
+