- // 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());
+ }