<?php
/**
 * [UQcms System] Copyright uqcms.com
 * QQ: 2200631718
 * Author: gj.name
 * This is NOT a freeware
*/  defined('IN_UQ') or exit('Access Denied'); class cache { function __construct(){ } public static function get($filename){ $cache_file = UQCMS_PATH.'temp/'.$filename.'.php'; if(file_exists($cache_file)){ $content = include $cache_file; return $content; }else{ return false; } } public static function add($filename, $content, $time = 86400){ $cache_file = UQCMS_PATH.'temp/'.$filename.'.php'; file_put_contents($cache_file, "<?php \r\n return ".var_export($content, true).";"); return true; } public static function del($filename){ $filename = UQCMS_PATH.'temp/'.$filename.'.php'; file::del_file($filename); return true; } } 