Neos\Cache\Backend\RedisBackend::get PHP Метод

get() публичный Метод

Loads data from the cache.
public get ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
Результат mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded
    public function get($entryIdentifier)
    {
        return $this->uncompress($this->redis->get($this->buildKey('entry:' . $entryIdentifier)));
    }

Usage Example

 /**
  * @test
  */
 public function removeRemovesEntryFromCache()
 {
     for ($i = 0; $i < 10; $i++) {
         $this->backend->set('entry_' . $i, 'foo', ['tag1']);
     }
     $this->assertCount(10, $this->backend->findIdentifiersByTag('tag1'));
     $this->assertEquals('foo', $this->backend->get('entry_1'));
     $actualEntries = [];
     foreach ($this->backend as $key => $value) {
         $actualEntries[] = $key;
     }
     $this->assertCount(10, $actualEntries);
     $this->backend->remove('entry_3');
     $this->assertCount(9, $this->backend->findIdentifiersByTag('tag1'));
     $this->assertFalse($this->backend->get('entry_3'));
     $actualEntries = [];
     foreach ($this->backend as $key => $value) {
         $actualEntries[] = $key;
     }
     $this->assertCount(9, $actualEntries);
 }
All Usage Examples Of Neos\Cache\Backend\RedisBackend::get