src/Traits/MicroServiceCacheTrait.php
public function getModelCacheKeys(Cacheable $model)
    {
        // Build list of cache keys we need to clear.
        $cacheKeys = [
            implode(':', [$model->getTable(), 'index']),
        ];

        // If the model has an primary key add the cache key.
        if (!empty($model->getPrimaryKeyValue())) {
            $cacheKeys[] = implode(':', [$model->getTable(), $model->getPrimaryKeyValue()]);
        }

        // Add the cache keys for the model attributes.
        $this->addAttributeCacheKeys($cacheKeys, $model);

        return $cacheKeys;
    }
public function getModelCacheKeys(Cacheable $model)
    {
        // Build list of cache keys we need to clear.
        $cacheKeys = [
            implode(':', [$model->getTable(), 'index']),
        ];

        // If the model has an primary key add the cache key.
        if (!empty($model->getPrimaryKeyValue())) {
            $cacheKeys[] = implode(':', [$model->getTable(), $model->getPrimaryKeyValue()]);
        }

        // Add the cache keys for the model attributes.
        $this->addAttributeCacheKeys($cacheKeys, $model);

        return $cacheKeys;
    }
public function getModelCacheKeys ( Cacheable $ model ) { // Build list of cache keys we need to clear. $ cacheKeys = [ implode ( ':' , [ $ model -> getTable ( ) , 'index' ] ) , ] ; // If the model has an primary key add the cache key. if ( ! empty ( $ model -> getPrimaryKeyValue ( ) ) ) { $ cacheKeys [ ] = implode ( ':' , [ $ model -> getTable ( ) , $ model -> getPrimaryKeyValue ( ) ] ) ; } // Add the cache keys for the model attributes. $ this -> addAttributeCacheKeys ( $ cacheKeys , $ model ) ; return $ cacheKeys ; }
Get an array of possible cache keys for the given model.

@param Cacheable $model
@return array|bool
Get an array of possible cache keys for the given model .