CacheFile::__construct PHP Method

__construct() public method

架构函数
public __construct ( $options = [] )
    public function __construct($options = array())
    {
        if (!empty($options)) {
            $this->options = $options;
        }
        $this->options['temp'] = !empty($options['temp']) ? $options['temp'] : C('DATA_CACHE_PATH');
        $this->options['prefix'] = isset($options['prefix']) ? $options['prefix'] : C('DATA_CACHE_PREFIX');
        $this->options['expire'] = isset($options['expire']) ? $options['expire'] : C('DATA_CACHE_TIME');
        $this->options['length'] = isset($options['length']) ? $options['length'] : 0;
        if (substr($this->options['temp'], -1) != '/') {
            $this->options['temp'] .= '/';
        }
        $this->init();
    }