Stores the parsed annotations to the Redis database. This adapter is suitable for production. use Phalcon\Annotations\Adapter\Redis; $annotations = new Redis([ 'lifetime' => 8600, 'host' => 'localhost', 'port' => 6379, 'prefix' => 'annotations_', ]);
Inheritance: extends Base
Example #1
0
 /**
  * @dataProvider providerReadWrite
  * @param string $key
  * @param mixed $data
  */
 public function testShouldReadAndWriteToRedisWithPrefix($key, $data)
 {
     $object = new Redis(['host' => TEST_RS_HOST, 'prefix' => 'test_']);
     $object->write($key, $data);
     $this->assertEquals($data, $object->read($key));
 }