RedisManager
class RedisManager implements Factory mixin Connection (View source)
Properties
protected Application | $app | The application instance. |
|
protected string | $driver | The name of the default driver. |
|
protected array | $customCreators | The registered custom driver creators. |
|
protected array | $config | The Redis server configurations. |
|
protected mixed | $connections | The Redis connections. |
|
protected bool | $events | Indicates whether event dispatcher is set on connections. |
Methods
Get a Redis connection by name.
Resolve the given connection by name.
Resolve the given cluster connection by name.
Configure the given connection to prepare it for commands.
Parse the Redis connection configuration.
Return all of the created connections.
Enable the firing of Redis command events.
Disable the firing of Redis command events.
Set the default driver.
Disconnect the given connection and remove from local cache.
Pass methods onto the default Redis connection.
Details
void
__construct(Application $app, string $driver, array $config)
Create a new Redis manager instance.
Connection
connection(string|null $name = null)
Get a Redis connection by name.
Connection
resolve(string|null $name = null)
Resolve the given connection by name.
protected Connection
resolveCluster(string $name)
Resolve the given cluster connection by name.
protected Connection
configure(Connection $connection, string $name)
Configure the given connection to prepare it for commands.
protected Connector|null
connector()
Get the connector instance for the current driver.
protected array
parseConnectionConfiguration(mixed $config)
Parse the Redis connection configuration.
array
connections()
Return all of the created connections.
void
enableEvents()
Enable the firing of Redis command events.
void
disableEvents()
Disable the firing of Redis command events.
void
setDriver(string $driver)
Set the default driver.
void
purge(string|null $name = null)
Disconnect the given connection and remove from local cache.
$this
extend(string $driver, Closure $callback)
Register a custom driver creator Closure.
mixed
__call(string $method, array $parameters)
Pass methods onto the default Redis connection.