选择语言 :

Driver_Cache_Driver_Apc
    └ Module_Cache_Driver

Apc缓存驱动器

API - Driver_Cache_Driver_Apc

继承自父类的方法和变量
author
呼吸二氧化碳 jonwang@myqee.com
category
Module
package
Cache
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

$this->__construct( )


$this->get( $key )

取得数据

参数列表

参数 类型 描述 默认值
$key string/array $key
返回值
  • mixed

$this->set( $key , $value = null, $lifetime = 3600)

存数据

参数列表

参数 类型 描述 默认值
$key string/array 支持多存
$value $data Value 多存时此项可空 null
$lifetime $lifetime 有效期,默认3600,即1小时,0表示最大值30天(2592000) integer 3600
返回值
  • boolean

$this->delete( $key )

删除指定key的缓存,若$key===true则表示删除全部

参数列表

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

$this->delete_all( )

删除全部

返回值
  • boolean

$this->delete_expired( )

过期数据会自动清除

返回值
  • boolean

$this->decrement( $key , $offset = 1, $lifetime = 60)

递减

与原始decrement方法区别的是若不存指定KEY时返回false,这个会自动递减

参数列表

参数 类型 描述 默认值
$key string $key
$offset int $offset integer 1
$lifetime int 当递减失则时当作set使用 integer 60
返回值
  • boolean

$this->increment( $key , $offset = 1, $lifetime = 60)

递增

与原始increment方法区别的是若不存指定KEY时返回false,这个会自动递增

参数列表

参数 类型 描述 默认值
$key string $key
$offset int $offset integer 1
$lifetime int 当递减失则时当作set使用 integer 60
返回值
  • boolean

$this->set_prefix( $prefix )

设置前缀

参数列表

参数 类型 描述 默认值
$prefix string $prefix
返回值
  • $this