48 public function set($entryIdentifier, $sourceCode, array $tags = array(), $lifetime = NULL) {
50 throw new \InvalidArgumentException(
'"' . $entryIdentifier .
'" is not a valid cache entry identifier.', 1264023823);
52 if (!is_string($sourceCode)) {
53 throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(
'The given source code is not a valid string.', 1264023824);
55 foreach ($tags as $tag) {
57 throw new \InvalidArgumentException(
'"' . $tag .
'" is not a valid tag for a cache entry.', 1264023825);
60 $sourceCode =
'<?php' . chr(10) . $sourceCode . chr(10) .
'#';
61 $this->backend->set($entryIdentifier, $sourceCode, $tags, $lifetime);
72 return $this->backend->requireOnce($entryIdentifier);
__construct($identifier, \TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface $backend)
requireOnce($entryIdentifier)
isValidEntryIdentifier($identifier)