src/Repositories/CacheWarmer/ProductCacheWarmer.php
public function warm()
    {

        // prepare the caches for the statements
        foreach ($this->repository->findAll() as $product) {
            // add the product to the cache, register the SKU reference as well
            $this->repository->toCache(
                $product[$this->repository->getPrimaryKeyName()],
                $product,
                array($product[MemberNames::SKU] => $product[$this->repository->getPrimaryKeyName()])
            );
        }
    }
public function warm()
    {

        // prepare the caches for the statements
        foreach ($this->repository->findAll() as $product) {
            // add the product to the cache, register the SKU reference as well
            $this->repository->toCache(
                $product[$this->repository->getPrimaryKeyName()],
                $product,
                array($product[MemberNames::SKU] => $product[$this->repository->getPrimaryKeyName()])
            );
        }
    }
public function warm ( ) { // prepare the caches for the statements foreach ( $ this -> repository -> findAll ( ) as $ product ) { // add the product to the cache, register the SKU reference as well $ this -> repository -> toCache ( $ product [ $ this -> repository -> getPrimaryKeyName ( ) ] , $ product , array ( $ product [ MemberNames :: SKU ] => $ product [ $ this -> repository -> getPrimaryKeyName ( ) ] ) ) ; } }
Warms the cache for the passed repository.

@return void
Warms the cache for the passed repository .