File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed
app/code/Magento/Store/Model/ResourceModel Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,6 @@ class Store extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
15
15
*/
16
16
protected $ configCache ;
17
17
18
- /**
19
- * @var array
20
- */
21
- private $ storesCache ;
22
-
23
18
/**
24
19
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
25
20
* @param \Magento\Framework\App\Cache\Type\Config $configCacheType
@@ -167,15 +162,11 @@ protected function _changeGroup(\Magento\Framework\Model\AbstractModel $model)
167
162
*/
168
163
public function readAllStores ()
169
164
{
170
- if (!$ this ->storesCache ) {
171
- $ select = $ this ->getConnection ()
172
- ->select ()
173
- ->from ($ this ->getTable ('store ' ));
174
-
175
- $ this ->storesCache = $ this ->getConnection ()->fetchAll ($ select );
176
- }
165
+ $ select = $ this ->getConnection ()
166
+ ->select ()
167
+ ->from ($ this ->getTable ('store ' ));
177
168
178
- return $ this ->storesCache ;
169
+ return $ this ->getConnection ()-> fetchAll ( $ select ) ;
179
170
}
180
171
181
172
/**
Original file line number Diff line number Diff line change @@ -46,15 +46,11 @@ protected function _initUniqueFields()
46
46
*/
47
47
public function readAllWebsites ()
48
48
{
49
- if (!$ this ->websitesCache ) {
50
- $ select = $ this ->getConnection ()
51
- ->select ()
52
- ->from ($ this ->getTable ('store_website ' ));
49
+ $ select = $ this ->getConnection ()
50
+ ->select ()
51
+ ->from ($ this ->getTable ('store_website ' ));
53
52
54
- $ this ->websitesCache = $ this ->getConnection ()->fetchAll ($ select );
55
- }
56
-
57
- return $ this ->websitesCache ;
53
+ return $ this ->getConnection ()->fetchAll ($ select );
58
54
}
59
55
60
56
/**
You can’t perform that action at this time.
0 commit comments