public function set(string $entryIdentifier, $sourceCode, array $tags = [], int $lifetime = null)
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823);
        }
        if (!is_string($sourceCode)) {
            throw new InvalidDataException('The given source code is not a valid string.', 1264023824);
        }
        foreach ($tags as $tag) {
            if (!$this->isValidTag($tag)) {
                throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1264023825);
            }
        }
        $sourceCode = '<?php ' . $sourceCode . chr(10) . '#';
        $this->backend->set($entryIdentifier, $sourceCode, $tags, $lifetime);
    }
public function set(string $entryIdentifier, $sourceCode, array $tags = [], int $lifetime = null)
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823);
        }
        if (!is_string($sourceCode)) {
            throw new InvalidDataException('The given source code is not a valid string.', 1264023824);
        }
        foreach ($tags as $tag) {
            if (!$this->isValidTag($tag)) {
                throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1264023825);
            }
        }
        $sourceCode = '<?php ' . $sourceCode . chr(10) . '#';
        $this->backend->set($entryIdentifier, $sourceCode, $tags, $lifetime);
    }
public function set ( string $ entryIdentifier , $ sourceCode , array $ tags = [ ] , int $ lifetime = null ) { if ( ! $ this -> isValidEntryIdentifier ( $ entryIdentifier ) ) { throw new \ InvalidArgumentException ( '"' . $ entryIdentifier . '" is not a valid cache entry identifier.' , 1264023823 ) ; } if ( ! is_string ( $ sourceCode ) ) { throw new InvalidDataException ( 'The given source code is not a valid string.' , 1264023824 ) ; } foreach ( $ tags as $ tag ) { if ( ! $ this -> isValidTag ( $ tag ) ) { throw new \ InvalidArgumentException ( '"' . $ tag . '" is not a valid tag for a cache entry.' , 1264023825 ) ; } } $ sourceCode = '<?php ' . $ sourceCode . chr ( 10 ) . '#' ; $ this -> backend -> set ( $ entryIdentifier , $ sourceCode , $ tags , $ lifetime ) ; }
Saves the PHP source code in the cache.

@param string $entryIdentifier An identifier used for this cache entry, for example the class name
@param string $sourceCode PHP source code
@param array $tags Tags to associate with this cache entry
@param integer $lifetime Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
@return void
@throws InvalidDataException
@throws \InvalidArgumentException
@throws \Neos\Cache\Exception
@api
Saves the PHP source code in the cache .