File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 29
29
*/
30
30
class QueryFactory
31
31
{
32
+ /**
33
+ * Prefix for query cache to avoid collisions with other modules cache names
34
+ */
35
+ private const CACHE_PREFIX = 'commerce-export- ' ;
32
36
/**
33
37
* @var ConfigInterface
34
38
*/
@@ -138,7 +142,8 @@ private function constructQuery($queryName)
138
142
*/
139
143
public function create ($ queryName )
140
144
{
141
- $ cached = $ this ->queryCache ->load ($ queryName );
145
+ $ queryCacheName = self ::CACHE_PREFIX . $ queryName ;
146
+ $ cached = $ this ->queryCache ->load ($ queryCacheName );
142
147
if ($ cached ) {
143
148
$ queryData = $ this ->jsonSerializer ->unserialize ($ cached );
144
149
return $ this ->createQueryObject (
@@ -150,7 +155,7 @@ public function create($queryName)
150
155
$ query = $ this ->constructQuery ($ queryName );
151
156
$ this ->queryCache ->save (
152
157
$ this ->jsonSerializer ->serialize ($ query ),
153
- $ queryName ,
158
+ $ queryCacheName ,
154
159
['collections ' ]
155
160
);
156
161
return $ query ;
You can’t perform that action at this time.
0 commit comments