diff --git a/base.php b/base.php index 324908a0..6b09561c 100644 --- a/base.php +++ b/base.php @@ -21,13 +21,11 @@ defined('LIB_PATH') or define('LIB_PATH', THINK_PATH . 'library' . DS); defined('EXTEND_PATH') or define('EXTEND_PATH', THINK_PATH . 'extend' . DS); defined('MODE_PATH') or define('MODE_PATH', THINK_PATH . 'mode' . DS); // 系统应用模式目录 defined('CORE_PATH') or define('CORE_PATH', LIB_PATH . 'think' . DS); -defined('ORG_PATH') or define('ORG_PATH', LIB_PATH . 'org' . DS); defined('TRAIT_PATH') or define('TRAIT_PATH', LIB_PATH . 'traits' . DS); defined('APP_PATH') or define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . DS); defined('APP_NAMESPACE') or define('APP_NAMESPACE', 'app'); defined('COMMON_MODULE') or define('COMMON_MODULE', 'common'); defined('RUNTIME_PATH') or define('RUNTIME_PATH', realpath(APP_PATH) . DS . 'runtime' . DS); -defined('DATA_PATH') or define('DATA_PATH', RUNTIME_PATH . 'data' . DS); defined('LOG_PATH') or define('LOG_PATH', RUNTIME_PATH . 'log' . DS); defined('CACHE_PATH') or define('CACHE_PATH', RUNTIME_PATH . 'cache' . DS); defined('TEMP_PATH') or define('TEMP_PATH', RUNTIME_PATH . 'temp' . DS); diff --git a/library/think/Model.php b/library/think/Model.php index 2d04dd35..732bf466 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1435,7 +1435,7 @@ class Model } // 记录字段类型信息 $result = ['fields' => $fields, 'bind' => $bind, 'type' => $type, 'pk' => $pk]; - APP_DEBUG && Cache::set($guid, $result); + !APP_DEBUG && Cache::set($guid, $result, 0); } return $fetch ? $result[$fetch] : $result; } diff --git a/library/think/Url.php b/library/think/Url.php index a1e86d92..982272f2 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -272,7 +272,7 @@ class Url $alias[$route][] = [$rule, $var]; } } - Cache::set('think_route_alias', $alias); + !APP_DEBUG && Cache::set('think_route_alias', $alias); return $alias; }