class Illuminate / Cache / CacheManager
You are viewing an older version of the documentation. For the latest, please visit master documentation.

CacheManager

Implements

Properties

protected

$app Application

The application instance.

Default: null
protected

$stores array

The array of resolved cache stores.

Default: []
protected

$customCreators array

The registered custom driver creators.

Default: []

Methods

public

__construct ( $app ) : void

Create a new Cache manager instance.

Parameters

public

store ( $name ) : Repository

Get a cache store instance by name, wrapped in a repository.

Parameters

  • $name string|null
public

driver ( $driver ) : Repository

Get a cache driver instance.

Parameters

  • $driver string|null
protected

get ( $name ) : Repository

Attempt to get the store from the local cache.

Parameters

  • $name string
protected

resolve ( $name ) : Repository

Resolve the given store.

Parameters

  • $name string
protected

callCustomCreator ( array $config ) : mixed

Call a custom driver creator.

Parameters

  • $config array
protected

createApcDriver ( array $config ) : Repository

Create an instance of the APC cache driver.

Parameters

  • $config array
protected

createArrayDriver ( array $config ) : Repository

Create an instance of the array cache driver.

Parameters

  • $config array
protected

createFileDriver ( array $config ) : Repository

Create an instance of the file cache driver.

Parameters

  • $config array
protected

createMemcachedDriver ( array $config ) : Repository

Create an instance of the Memcached cache driver.

Parameters

  • $config array
protected

createNullDriver ( ) : Repository

Create an instance of the Null cache driver.

protected

createRedisDriver ( array $config ) : Repository

Create an instance of the Redis cache driver.

Parameters

  • $config array
protected

createDatabaseDriver ( array $config ) : Repository

Create an instance of the database cache driver.

Parameters

  • $config array
protected

createDynamodbDriver ( array $config ) : Repository

Create an instance of the DynamoDB cache driver.

Parameters

  • $config array
protected

newDynamodbClient ( array $config ) : Aws\...\DynamoDbClient

Create new DynamoDb Client instance.

public

repository ( Store $store ) : Repository

Create a new cache repository with the given implementation.

Parameters

protected

setEventDispatcher ( Repository $repository ) : void

Set the event dispatcher on the given repository instance.

Parameters

public

refreshEventDispatcher ( ) : void

Re-set the event dispatcher on all resolved cache repositories.

protected

getPrefix ( array $config ) : string

Get the cache prefix.

Parameters

  • $config array
protected

getConfig ( $name ) : array

Get the cache connection configuration.

Parameters

  • $name string
public

getDefaultDriver ( ) : string

Get the default cache driver name.

public

setDefaultDriver ( $name ) : void

Set the default cache driver name.

Parameters

  • $name string
public

forgetDriver ( $name ) : $this

Unset the given driver instances.

Parameters

  • $name array|string|null
public

purge ( $name ) : void

Disconnect the given driver and remove from local cache.

Parameters

  • $name string|null
public

extend ( $driver , Closure $callback ) : $this

Register a custom driver creator Closure.

Parameters

public

__call ( $method , $parameters ) : mixed

Dynamically call the default driver instance.

Parameters

  • $method string
  • $parameters array