File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/internal/Magento/Framework/App Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
/**
16
16
* Class ProductMetadata
17
+ *
17
18
* @package Magento\Framework\App
18
19
*/
19
20
class ProductMetadata implements ProductMetadataInterface
@@ -29,9 +30,9 @@ class ProductMetadata implements ProductMetadataInterface
29
30
const PRODUCT_NAME = 'Magento ' ;
30
31
31
32
/**
32
- * Magento version cache prefix
33
+ * Magento version cache key
33
34
*/
34
- const CACHE_PREFIX = 'mage-version ' ;
35
+ const VERSION_CACHE_KEY = 'mage-version ' ;
35
36
36
37
/**
37
38
* Product version
@@ -76,7 +77,7 @@ public function __construct(
76
77
*/
77
78
public function getVersion ()
78
79
{
79
- $ versionFromCache = $ this ->cache ->load (self ::CACHE_PREFIX );
80
+ $ versionFromCache = $ this ->cache ->load (self ::VERSION_CACHE_KEY );
80
81
$ this ->version = $ this ->version ?: $ versionFromCache ;
81
82
if (!$ this ->version ) {
82
83
if (!($ this ->version = $ this ->getSystemPackageVersion ())) {
@@ -85,7 +86,7 @@ public function getVersion()
85
86
} else {
86
87
$ this ->version = 'UNKNOWN ' ;
87
88
}
88
- $ this ->cache ->save ($ this ->version , self ::CACHE_PREFIX , [Config::CACHE_TAG ]);
89
+ $ this ->cache ->save ($ this ->version , self ::VERSION_CACHE_KEY , [Config::CACHE_TAG ]);
89
90
}
90
91
}
91
92
return $ this ->version ;
You can’t perform that action at this time.
0 commit comments