PHP Class Demo\Aspect\CachingAspect

Inheritance: implements Go\Aop\Aspect
Datei anzeigen Open project: goaop/framework

Public Methods

Method Description
aroundCacheable ( Go\Aop\Intercept\MethodInvocation $invocation ) This advice intercepts an execution of cacheable methods

Method Details

aroundCacheable() public method

Logic is pretty simple: we look for the value in the cache and if it's not present here then invoke original method and store it's result in the cache. Real-life examples will use APC or Memcache to store value in the cache
public aroundCacheable ( Go\Aop\Intercept\MethodInvocation $invocation )
$invocation Go\Aop\Intercept\MethodInvocation Invocation