2 namespace TYPO3\CMS\Core\Cache\Frontend;
17 use TYPO3\CMS\Core\Cache\Exception\InvalidDataException;
39 public function set($entryIdentifier, $string, array $tags = array(), $lifetime = null)
42 throw new \InvalidArgumentException(
'"' . $entryIdentifier .
'" is not a valid cache entry identifier.', 1233057566);
44 if (!is_string($string)) {
45 throw new InvalidDataException(
'Given data is of type "' . gettype($string) .
'", but a string is expected for string cache.', 1222808333);
47 foreach ($tags as $tag) {
49 throw new \InvalidArgumentException(
'"' . $tag .
'" is not a valid tag for a cache entry.', 1233057512);
52 $this->backend->set($entryIdentifier, $string, $tags, $lifetime);
63 public function get($entryIdentifier)
66 throw new \InvalidArgumentException(
'"' . $entryIdentifier .
'" is not a valid cache entry identifier.', 1233057752);
68 return $this->backend->get($entryIdentifier);
82 throw new \InvalidArgumentException(
'"' . $tag .
'" is not a valid tag for a cache entry.', 1233057772);
85 $identifiers = $this->backend->findIdentifiersByTag($tag);
87 $entries[] = $this->backend->get($identifier);