PHP code example of blackbird / module-eav-optimize
1. Go to this page and download the library: Download blackbird/module-eav-optimize library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
blackbird / module-eav-optimize example snippets
$product = $productRepository->getById(1);
echo $product->getAttributeText('color'); // First call - fetched from DB or cache
echo $product->getAttributeText('color'); // Second call - fetched from memoized storage