protected function doFind(array $id, \Owl\Service $service = null, $collection = null)
    {
        if ($record = $this->getCache($id)) {
            return isset($record['__IS_NOT_FOUND__']) ? false : $record;
        }

        if ($record = parent::doFind($id, $service, $collection)) {
            $record = $this->removeNullValues($record);
            $this->saveCache($id, $record);
        } else {
            $policy = $this->getCachePolicy();

            if ($ttl = $policy['not_found']) {
                $ttl = is_numeric($ttl) ? (int) $ttl : null;
                $this->saveCache($id, ['__IS_NOT_FOUND__' => 1], $ttl);
            }
        }

        return $record;
    }
protected function doFind(array $id, \Owl\Service $service = null, $collection = null)
    {
        if ($record = $this->getCache($id)) {
            return isset($record['__IS_NOT_FOUND__']) ? false : $record;
        }

        if ($record = parent::doFind($id, $service, $collection)) {
            $record = $this->removeNullValues($record);
            $this->saveCache($id, $record);
        } else {
            $policy = $this->getCachePolicy();

            if ($ttl = $policy['not_found']) {
                $ttl = is_numeric($ttl) ? (int) $ttl : null;
                $this->saveCache($id, ['__IS_NOT_FOUND__' => 1], $ttl);
            }
        }

        return $record;
    }
protected function doFind ( array $ id , \ Owl \ Service $ service = null , $ collection = null ) { if ( $ record = $ this -> getCache ( $ id ) ) { return isset ( $ record [ '__IS_NOT_FOUND__' ] ) ? false : $ record ; } if ( $ record = parent :: doFind ( $ id , $ service , $ collection ) ) { $ record = $ this -> removeNullValues ( $ record ) ; $ this -> saveCache ( $ id , $ record ) ; } else { $ policy = $ this -> getCachePolicy ( ) ; if ( $ ttl = $ policy [ 'not_found' ] ) { $ ttl = is_numeric ( $ ttl ) ? ( int ) $ ttl : null ; $ this -> saveCache ( $ id , [ '__IS_NOT_FOUND__' => 1 ] , $ ttl ) ; } } return $ record ; }
return record from cache if cache is created, or save data into cache.

@param array        $id
@param \Owl\Service $service
@param string       $collection

@return array
return record from cache if cache is created or save data into cache .