Class: WindResolvedCrashDependency
Source Location: /cache/dependency/WindResolvedCrashDependency.php
Class WindResolvedCrashDependency
Class Overview
Implements interfaces:
cache依赖实现,通过该实现解决大并发时cache(memcached)的值突然失效
在value内部设置1个超时值(timeout1), timeout1比实际的cache(memcached)timeout(timeout2)小. 当从cache读取到timeout1发现它已经过期时候,马上延长timeout1并重新设置到cache. 然后再从数据库加载数据并设置到cache中. <note>注意:该方法用回调的方式来获得当前缓存的数据值.</note>
Located in /cache/dependency/WindResolvedCrashDependency.php [line 18]
Author(s):
Information Tags:
Version: | $Id: WindResolvedCrashDependency.php 2973 2011-10-15 19:22:48Z yishuo $ |
Copyright: | ©2003-2103 phpwind.com |
License: | http://www.windframework.com |
|
Methods
|
Methods
WindResolvedCrashDependency __construct(
array
$callBack, [array
$args = array()], [int
$timeOut = 0]
)
|
|
Parameters:
array |
$callBack: |
回调方法,通过该方法返回当前数据 |
array |
$args: |
回调方法参数 |
int |
$timeOut: |
超时时间 |
API Tags:
|
|