缓存服务
[ 查看开发文档 ] [ 类树图: Cache ] [ 索引: Cache ] [ 所有元素 ] [ 首页 ]

Class: Redis

源文件路径: /Service/Cache/Drivers/Redis.class.php

Class Overview

Cache
   |
   --Redis

Redis缓存驱动 要求安装phpredis扩展:https://github.com/nicolasff/phpredis


Methods


Inherited Variables

Inherited Methods


Class Details

[line 13]
Redis缓存驱动 要求安装phpredis扩展:https://github.com/nicolasff/phpredis


[ Top ]


Method Detail

__construct (Constructor)   [line 19]

Redis __construct( [array $options = array()])

架构函数
  • Access: public

Parameters:

array   $options   —  缓存参数

[ Top ]

clear   [line 101]

boolean clear( )

清除缓存
  • Access: public

[ Top ]

get   [line 53]

mixed get( string $name)

读取缓存
  • Access: public

Parameters:

string   $name   —  缓存变量名

[ Top ]

rm   [line 92]

boolean rm( string $name)

删除缓存
  • Access: public

Parameters:

string   $name   —  缓存变量名

[ Top ]

set   [line 67]

boolean set( string $name, mixed $value, [integer $expire = null])

写入缓存
  • Access: public

Parameters:

string   $name   —  缓存变量名
mixed   $value   —  存储数据
integer   $expire   —  有效时间(秒)

[ Top ]


Powered by Steeze. author email: spring.wind2006@163.com