Skip to content

Commit 7661eae

Browse files
author
Joan He
committed
Merge remote-tracking branch 'origin/MAGETWO-43857-invalidate-cache' into develop
2 parents 80c5e2b + d65af0e commit 7661eae

File tree

66 files changed

+400
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+400
-322
lines changed

app/code/Magento/Backup/Model/Config/Backend/Cron.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Cron extends \Magento\Framework\App\Config\Value
3232
* @param \Magento\Framework\Model\Context $context
3333
* @param \Magento\Framework\Registry $registry
3434
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
35+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
3536
* @param \Magento\Framework\App\Config\ValueFactory $configValueFactory
3637
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
3738
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
@@ -42,6 +43,7 @@ public function __construct(
4243
\Magento\Framework\Model\Context $context,
4344
\Magento\Framework\Registry $registry,
4445
\Magento\Framework\App\Config\ScopeConfigInterface $config,
46+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
4547
\Magento\Framework\App\Config\ValueFactory $configValueFactory,
4648
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
4749
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
@@ -50,13 +52,13 @@ public function __construct(
5052
) {
5153
$this->_runModelPath = $runModelPath;
5254
$this->_configValueFactory = $configValueFactory;
53-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
55+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
5456
}
5557

5658
/**
5759
* Cron settings after save
5860
*
59-
* @return void
61+
* @return $this
6062
* @throws \Magento\Framework\Exception\LocalizedException
6163
*/
6264
public function afterSave()
@@ -102,5 +104,6 @@ public function afterSave()
102104
} catch (\Exception $e) {
103105
throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t save the Cron expression.'));
104106
}
107+
return parent::afterSave();
105108
}
106109
}

app/code/Magento/Braintree/Model/System/Config/Backend/Countrycreditcard.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Countrycreditcard extends \Magento\Framework\App\Config\Value
1616
* @param \Magento\Framework\Model\Context $context
1717
* @param \Magento\Framework\Registry $registry
1818
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
19+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
1920
* @param \Magento\Framework\Math\Random $mathRandom
2021
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
2122
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
@@ -25,13 +26,14 @@ public function __construct(
2526
\Magento\Framework\Model\Context $context,
2627
\Magento\Framework\Registry $registry,
2728
\Magento\Framework\App\Config\ScopeConfigInterface $config,
29+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
2830
\Magento\Framework\Math\Random $mathRandom,
2931
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
3032
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
3133
array $data = []
3234
) {
3335
$this->mathRandom = $mathRandom;
34-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
36+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
3537
}
3638

3739
/**

app/code/Magento/Catalog/Model/Config/Backend/Category.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Category extends \Magento\Framework\App\Config\Value
2525
* @param \Magento\Framework\Model\Context $context
2626
* @param \Magento\Framework\Registry $registry
2727
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
28+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2829
* @param \Magento\Catalog\Model\Category $catalogCategory
2930
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
3031
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
@@ -34,13 +35,14 @@ public function __construct(
3435
\Magento\Framework\Model\Context $context,
3536
\Magento\Framework\Registry $registry,
3637
\Magento\Framework\App\Config\ScopeConfigInterface $config,
38+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
3739
\Magento\Catalog\Model\Category $catalogCategory,
3840
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
3941
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
4042
array $data = []
4143
) {
4244
$this->_catalogCategory = $catalogCategory;
43-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
45+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
4446
}
4547

4648
/**
@@ -67,6 +69,6 @@ public function afterSave()
6769
$this->_catalogCategory->setStoreId($storeId)->save();
6870
}
6971
}
70-
return $this;
72+
return parent::afterSave();
7173
}
7274
}

app/code/Magento/Catalog/Model/Config/CatalogClone/Media/Image.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Image extends \Magento\Framework\App\Config\Value
3030
* @param \Magento\Framework\Model\Context $context
3131
* @param \Magento\Framework\Registry $registry
3232
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
33+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
3334
* @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory
3435
* @param \Magento\Eav\Model\Config $eavConfig
3536
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
@@ -40,6 +41,7 @@ public function __construct(
4041
\Magento\Framework\Model\Context $context,
4142
\Magento\Framework\Registry $registry,
4243
\Magento\Framework\App\Config\ScopeConfigInterface $config,
44+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
4345
\Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeCollectionFactory,
4446
\Magento\Eav\Model\Config $eavConfig,
4547
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
@@ -48,7 +50,7 @@ public function __construct(
4850
) {
4951
$this->_attributeCollectionFactory = $attributeCollectionFactory;
5052
$this->_eavConfig = $eavConfig;
51-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
53+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
5254
}
5355

5456
/**

app/code/Magento/Catalog/Model/Indexer/Category/Flat/System/Config/Mode.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Mode extends \Magento\Framework\App\Config\Value
2020
* @param \Magento\Framework\Model\Context $context
2121
* @param \Magento\Framework\Registry $registry
2222
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
23+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2324
* @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry
2425
* @param \Magento\Indexer\Model\Indexer\State $indexerState
2526
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
@@ -30,13 +31,14 @@ public function __construct(
3031
\Magento\Framework\Model\Context $context,
3132
\Magento\Framework\Registry $registry,
3233
\Magento\Framework\App\Config\ScopeConfigInterface $config,
34+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
3335
\Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
3436
\Magento\Indexer\Model\Indexer\State $indexerState,
3537
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
3638
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
3739
array $data = []
3840
) {
39-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
41+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
4042
$this->indexerRegistry = $indexerRegistry;
4143
$this->indexerState = $indexerState;
4244
}
@@ -49,7 +51,7 @@ public function __construct(
4951
public function afterSave()
5052
{
5153
$this->_getResource()->addCommitCallback([$this, 'processValue']);
52-
return $this;
54+
return parent::afterSave();
5355
}
5456

5557
/**

app/code/Magento/Catalog/Model/Indexer/Product/Flat/System/Config/Mode.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Mode extends \Magento\Framework\App\Config\Value
2424
* @param \Magento\Framework\Model\Context $context
2525
* @param \Magento\Framework\Registry $registry
2626
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
27+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2728
* @param \Magento\Catalog\Model\Indexer\Product\Flat\Processor $productFlatIndexerProcessor
2829
* @param \Magento\Indexer\Model\Indexer\State $indexerState
2930
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
@@ -34,6 +35,7 @@ public function __construct(
3435
\Magento\Framework\Model\Context $context,
3536
\Magento\Framework\Registry $registry,
3637
\Magento\Framework\App\Config\ScopeConfigInterface $config,
38+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
3739
\Magento\Catalog\Model\Indexer\Product\Flat\Processor $productFlatIndexerProcessor,
3840
\Magento\Indexer\Model\Indexer\State $indexerState,
3941
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
@@ -42,7 +44,7 @@ public function __construct(
4244
) {
4345
$this->_productFlatIndexerProcessor = $productFlatIndexerProcessor;
4446
$this->indexerState = $indexerState;
45-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
47+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
4648
}
4749

4850
/**
@@ -53,7 +55,7 @@ public function __construct(
5355
public function afterSave()
5456
{
5557
$this->_getResource()->addCommitCallback([$this, 'processValue']);
56-
return $this;
58+
return parent::afterSave();
5759
}
5860

5961
/**

app/code/Magento/Catalog/Model/Indexer/Product/Price/System/Config/PriceScope.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class PriceScope extends \Magento\Framework\App\Config\Value
1717
* @param \Magento\Framework\Model\Context $context
1818
* @param \Magento\Framework\Registry $registry
1919
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
20+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2021
* @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry
2122
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
2223
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
@@ -26,24 +27,25 @@ public function __construct(
2627
\Magento\Framework\Model\Context $context,
2728
\Magento\Framework\Registry $registry,
2829
\Magento\Framework\App\Config\ScopeConfigInterface $config,
30+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
2931
\Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
3032
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
3133
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
3234
array $data = []
3335
) {
34-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
36+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
3537
$this->indexerRegistry = $indexerRegistry;
3638
}
3739

3840
/**
3941
* Set after commit callback
4042
*
41-
* @return \Magento\Catalog\Model\Indexer\Product\Price\System\Config\PriceScope
43+
* @return $this
4244
*/
4345
public function afterSave()
4446
{
4547
$this->_getResource()->addCommitCallback([$this, 'processValue']);
46-
return $this;
48+
return parent::afterSave();
4749
}
4850

4951
/**

app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,21 @@ class Suffix extends \Magento\Framework\App\Config\Value
3939
* @param \Magento\Framework\Model\Context $context
4040
* @param \Magento\Framework\Registry $registry
4141
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
42-
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
43-
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
42+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
4443
* @param \Magento\UrlRewrite\Helper\UrlRewrite $urlRewriteHelper
4544
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
46-
* @param \Magento\Framework\App\ResourceConnection $appResource
45+
* @param ResourceConnection $appResource
4746
* @param \Magento\UrlRewrite\Model\UrlFinderInterface $urlFinder
47+
* @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
48+
* @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
4849
* @param array $data
4950
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
5051
*/
5152
public function __construct(
5253
\Magento\Framework\Model\Context $context,
5354
\Magento\Framework\Registry $registry,
5455
\Magento\Framework\App\Config\ScopeConfigInterface $config,
56+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
5557
\Magento\UrlRewrite\Helper\UrlRewrite $urlRewriteHelper,
5658
\Magento\Store\Model\StoreManagerInterface $storeManager,
5759
\Magento\Framework\App\ResourceConnection $appResource,
@@ -60,7 +62,7 @@ public function __construct(
6062
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
6163
array $data = []
6264
) {
63-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
65+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
6466
$this->urlRewriteHelper = $urlRewriteHelper;
6567
$this->connection = $appResource->getConnection();
6668
$this->urlFinder = $urlFinder;

app/code/Magento/CatalogInventory/Model/Config/Backend/AbstractValue.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ abstract class AbstractValue extends \Magento\Framework\App\Config\Value
2525
* @param \Magento\Framework\Model\Context $context
2626
* @param \Magento\Framework\Registry $registry
2727
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
28+
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
2829
* @param \Magento\CatalogInventory\Api\StockIndexInterface $stockIndex
2930
* @param \Magento\CatalogInventory\Model\Indexer\Stock\Processor $stockIndexerProcessor
3031
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
@@ -35,6 +36,7 @@ public function __construct(
3536
\Magento\Framework\Model\Context $context,
3637
\Magento\Framework\Registry $registry,
3738
\Magento\Framework\App\Config\ScopeConfigInterface $config,
39+
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
3840
\Magento\CatalogInventory\Api\StockIndexInterface $stockIndex,
3941
\Magento\CatalogInventory\Model\Indexer\Stock\Processor $stockIndexerProcessor,
4042
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
@@ -43,6 +45,6 @@ public function __construct(
4345
) {
4446
$this->_stockIndexerProcessor = $stockIndexerProcessor;
4547
$this->stockIndex = $stockIndex;
46-
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
48+
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
4749
}
4850
}

app/code/Magento/CatalogInventory/Model/Config/Backend/Backorders.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public function afterSave()
2828
$this->stockIndex->rebuild();
2929
$this->_stockIndexerProcessor->markIndexerAsInvalid();
3030
}
31-
return $this;
31+
return parent::afterSave();
3232
}
3333
}

0 commit comments

Comments
 (0)