phpDocumentor cache
dependency
[ class tree: cache ] [ index: cache ] [ all elements ]

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

[ Top ]
Method Summary
WindResolvedCrashDependency   __construct()  
void   hasChanged()  
void   injectDependent()  

[ Top ]
Methods
Constructor __construct  [line 31]

  WindResolvedCrashDependency __construct( array $callBack, [array $args = array()], [int $timeOut = 0]  )

Parameters:
array   $callBack:  回调方法,通过该方法返回当前数据
array   $args:  回调方法参数
int   $timeOut:  超时时间

API Tags:
Access:  public


[ Top ]
hasChanged  [line 48]

  void hasChanged( $cache, $key, $expires  )

Parameters:
   $cache: 
   $key: 
   $expires: 

API Tags:
Access:  public


Implementation of:
IWindCacheDependency::hasChanged()
检查是否有变更

[ Top ]
injectDependent  [line 40]

  void injectDependent( $expires  )

Parameters:
   $expires: 

API Tags:
Access:  public


Implementation of:
IWindCacheDependency::injectDependent()
初始化依赖设置

[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:39 +0800 by phpDocumentor 1.4.4