src/Repositories/EavAttributeOptionValueRepository.php
/**
     * Load's and return's the EAV attribute option value with the passed option ID and store ID
     *
     * @param string  $optionId The option ID of the attribute option
     * @param integer $storeId  The store ID of the attribute option to load
     *
     * @return array The EAV attribute option value
     */
Load's and return's the EAV attribute option value with the passed option ID and store ID
@param string  $optionId The option ID of the attribute option
@param integer $storeId  The store ID of the attribute option to load

@return array The EAV attribute option value
Load ' s and return ' s the EAV attribute option value with the passed option ID and store ID @param string $optionId The option ID of the attribute option @param integer $storeId The store ID of the attribute option to load @return array The EAV attribute option value
public function findOneByOptionIdAndStoreId($optionId, $storeId)
    {
        $params = array(
            MemberNames::OPTION_ID => $optionId,
            MemberNames::STORE_ID  => $storeId,
        );
        $cacheKey = $this->cacheAdapter->cacheKey(array(SqlStatementKeys::EAV_ATTRIBUTE_OPTION_VALUE_BY_OPTION_ID_AND_STORE_ID => $params));
        if ($this->cacheAdapter->isCached($cacheKey)) {
            return $this->cacheAdapter->fromCache($cacheKey);
        }
        $this->eavAttributeOptionValueByOptionIdAndStoreIdStmt->execute($params);
        if ($eavAttributeOptionValue = $this->eavAttributeOptionValueByOptionIdAndStoreIdStmt->fetch(\PDO::FETCH_ASSOC)) {
            $uniqueKey = array(CacheKeys::EAV_ATTRIBUTE_OPTION_VALUE => $eavAttributeOptionValue[$this->getPrimaryKeyName()]);
            $this->cacheAdapter->toCache($uniqueKey, $eavAttributeOptionValue, array($cacheKey => $uniqueKey));
        }
        return $eavAttributeOptionValue;
    }
public function findOneByOptionIdAndStoreId ( $ optionId , $ storeId ) { $ params = array ( MemberNames :: OPTION_ID => $ optionId , MemberNames :: STORE_ID => $ storeId , ) ; $ cacheKey = $ this -> cacheAdapter -> cacheKey ( array ( SqlStatementKeys :: EAV_ATTRIBUTE_OPTION_VALUE_BY_OPTION_ID_AND_STORE_ID => $ params ) ) ; if ( $ this -> cacheAdapter -> isCached ( $ cacheKey ) ) { return $ this -> cacheAdapter -> fromCache ( $ cacheKey ) ; } $ this -> eavAttributeOptionValueByOptionIdAndStoreIdStmt -> execute ( $ params ) ; if ( $ eavAttributeOptionValue = $ this -> eavAttributeOptionValueByOptionIdAndStoreIdStmt -> fetch ( \ PDO :: FETCH_ASSOC ) ) { $ uniqueKey = array ( CacheKeys :: EAV_ATTRIBUTE_OPTION_VALUE => $ eavAttributeOptionValue [ $ this -> getPrimaryKeyName ( ) ] ) ; $ this -> cacheAdapter -> toCache ( $ uniqueKey , $ eavAttributeOptionValue , array ( $ cacheKey => $ uniqueKey ) ) ; } return $ eavAttributeOptionValue ; }
Load's and return's the EAV attribute option value with the passed option ID and store ID
 @param string  $optionId The option ID of the attribute option
 @param integer $storeId  The store ID of the attribute option to load
Load ' s and return ' s the EAV attribute option value with the passed option ID and store ID @param string $optionId The option ID of the attribute option @param integer $storeId The store ID of the attribute option to load
// the parameters of the EAV attribute option to load // prepare the cache key // query whether or not the item has already been cached // load the EAV attribute option value with the passed parameters // query whether or not the EAV attribute option value is available in the database // prepare the unique cache key for the EAV attribute option value // add the EAV attribute option value to the cache, register the cache key reference as well // finally, return it