Skip to content

Instantly share code, notes, and snippets.

@BlackhawkG7
Last active March 27, 2018 15:16
Show Gist options
  • Save BlackhawkG7/4e6e4211a303457390f1e0680f97bebc to your computer and use it in GitHub Desktop.
Save BlackhawkG7/4e6e4211a303457390f1e0680f97bebc to your computer and use it in GitHub Desktop.
TYPO3 extbase Cache Manager injection
/**
* cacheManager
*
* @var \TYPO3\CMS\Core\Cache\CacheManager
* @inject
*/
protected $cacheManager;
// if (($result = $this->cacheManager->getCache('extension_key')->get('cacheKey')) === false) {
// $query = $this->createQuery();
// $result = $query->execute();
// $this->cacheManager->getCache('extension_key')->set('cacheKey', $result, [], 3600);
// }
// return $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment