Angejia\Pea\RedisMeta::flush PHP Method

flush() public method

public flush ( $db, $table )
    public function flush($db, $table)
    {
        $key = implode(':', [$this->prefix, self::KEY_UPDATE_VERSION, $db, $table]);
        $key = md5($key);
        $this->redis->incr($key);
    }

Usage Example

Example #1
0
 public function testFlush()
 {
     $redis = M::mock(Redis::class);
     $redis->shouldReceive('incr')->with('1031d621441d2f689f95870d86225cf2');
     $meta = new RedisMeta($redis);
     $meta->flush('angejia', 'user');
 }