Registry Service
Simple Memory cache class, handy for use before TYPO3 native caches are available (they can not be injected/instantiated during ext_localconf.php).
- class RegistryService
-
- Fully qualified name
-
\Jar\
Utilities\ Services\ Registry Service
- set ( $storeName, $key, $value)
-
Put a item in a store.
- param string $storeName
-
Name of the store.
- param string $key
-
Key of the item.
- param mixed $value
-
Value of the item.
- Returns
-
self
Example:
$cache = GeneralUtility::makeInstance(RegistryService::class);
$hash = 'my-elements';
if (($elements = $cache->get('my-little-store', $hash)) === false) {
$elements = [1, 2, 3, 4, 5];
$cache->set('my-little-store', $hash, $elements);
}
var_dump($cache->getWholeStore('my-little-store'));
// Result of var_dump:
[
'my-elements' => [1, 2, 3, 4, 5]
]
Copied!