Object/facade/CacheManager.php
public function process($index, \Closure $closure)
    {
        $closureArguments = func_get_args();
        $closureArguments = array_slice($closureArguments, 2);
        
        list ($id, $key) = explode("@", $index, 2);
        
        $cacheCollection = $this->getProvider()->get($id);
        if ($cacheCollection !== null) {
            if ($cacheCollection->has($key)) {
                return $cacheCollection->get($key)->getContent();
            } else {
                return $this->callClosure($closure, $closureArguments, $id, $key);
            }
        } else {
            return $this->callClosure($closure, $closureArguments, $id, $key);
        }
    }
public function process($index, \Closure $closure)
    {
        $closureArguments = func_get_args();
        $closureArguments = array_slice($closureArguments, 2);
        
        list ($id, $key) = explode("@", $index, 2);
        
        $cacheCollection = $this->getProvider()->get($id);
        if ($cacheCollection !== null) {
            if ($cacheCollection->has($key)) {
                return $cacheCollection->get($key)->getContent();
            } else {
                return $this->callClosure($closure, $closureArguments, $id, $key);
            }
        } else {
            return $this->callClosure($closure, $closureArguments, $id, $key);
        }
    }
Process

Return a cache element
or the result of the
closure if undefined
and register it into
the cache

@param string   $index        - the cache index formatted as 'id@key'
@param \Closure $closure      - the closure
@param mixed    $arguments... - the closure arguments

@return string
@throws \Exception - throw an exception if the result of the closure is not a string