芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/status.pulsehost.co.uk/app/models/Projects.php
getItem('projects?user_id=' . $user_id); /* Set cache if not existing */ if(is_null($cache_instance->get())) { /* Get data from the database */ $projects_result = database()->query("SELECT * FROM `projects` WHERE `user_id` = {$user_id}"); while($row = $projects_result->fetch_object()) $projects[$row->project_id] = $row; cache()->save( $cache_instance->set($projects)->expiresAfter(CACHE_DEFAULT_SECONDS)->addTag('user_id=' . $user_id) ); } else { /* Get cache */ $projects = $cache_instance->get(); } return $projects; } }