选择语言 :

Module_Storage

持久存储类

常量
Storage::DRIVER_FILE string(4) "File"
Storage::DRIVER_REDIS string(5) "Redis"
Storage::DRIVER_SWIFT string(5) "Swift"
Storage::DRIVER_DATABASE string(8) "Database"
Storage::DEFAULT_CONFIG_NAME string(7) "default"

API - Module_Storage

author
呼吸二氧化碳 jonwang@myqee.com
category
Module
package
Storage
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

Storage::instance( $config_name = null)

返回数据库实例化对象

参数列表

参数 类型 描述 默认值
$config_name string 默认值为 Database::DEFAULT_CONFIG_NAME null
返回值
  • Database

$this->__construct( )


$this->get( $key )

获取指定KEY的缓存数据

$strone->get('a');
$strone->get('a','b','c');
$strone->get(array('a','b','c'));

参数列表

参数 类型 描述 默认值
$key string 指定key
返回值
  • mixed
  • false 返回失败

$this->set( $key , $value )

保存内容

参数列表

参数 类型 描述 默认值
$key $key String
$value $value Fixed
返回值
  • boolean

$this->exists( $key )

是否存在关键字的数据

参数列表

参数 类型 描述 默认值
$key string $key
返回值
  • boolean

$this->delete( $key )

删除指定key的缓存数据

参数列表

参数 类型 描述 默认值
$key string $key
返回值
  • boolean

$this->clean( )

删除全部缓存

delete_all()的别名

返回值
  • boolean

$this->delete_all( )

删除全部缓存

返回值
  • boolean