abstract
File
cachedriverssectionable.php
Package
Default
Class hierarchy
LaravelCacheDriversSectionable

Tags

None found

Properties

$implicit

$implicit : boolean

Indicates that section caching is implicit based on keys.

Type

boolean

Tags

None found

$delimiter

$delimiter : string

The implicit section key delimiter.

Type

string

Tags

None found

Methods

has()

has(string  $key) : boolean

Determine if an item exists in the cache.

Parameters

string $key

Returns

boolean

abstract
Inherited from
LaravelCacheDriversDriver

Tags

None found

get()

get(string  $key, mixed  $default = null) : mixed

Get an item from the cache.

// Get an item from the cache driver $name = Cache::driver('name');

// Return a default value if the requested item isn't cached
$name = Cache::get('name', 'Taylor');

Parameters

string $key
mixed $default

Returns

mixed

Inherited from
LaravelCacheDriversDriver

Tags

None found

put()

put(string  $key, mixed  $value, integer  $minutes) : void

Write an item to the cache for a given number of minutes.

// Put an item in the cache for 15 minutes Cache::put('name', 'Taylor', 15);

Parameters

string $key
mixed $value
integer $minutes

abstract
Inherited from
LaravelCacheDriversDriver

Tags

None found

remember()

remember(string  $key, mixed  $default, integer  $minutes, string  $function = 'put') : mixed

Get an item from the cache, or cache and return the default value.

// Get an item from the cache, or cache a value for 15 minutes $name = Cache::remember('name', 'Taylor', 15);

// Use a closure for deferred execution
$count = Cache::remember('count', function() { return User::count(); }, 15);

Parameters

string $key
mixed $default
integer $minutes
string $function

Returns

mixed

Inherited from
LaravelCacheDriversDriver

Tags

None found

sear()

sear(string  $key, mixed  $default) : mixed

Get an item from the cache, or cache the default value forever.

Parameters

string $key
mixed $default

Returns

mixed

Inherited from
LaravelCacheDriversDriver

Tags

None found

forget()

forget(string  $key) : void

Delete an item from the cache.

Parameters

string $key

abstract
Inherited from
LaravelCacheDriversDriver

Tags

None found

get_from_section()

get_from_section(string  $section, string  $key, mixed  $default = null) : mixed

Retrieve a sectioned item from the cache driver.

Parameters

string $section
string $key
mixed $default

Returns

mixed

Tags

None found

put_in_section()

put_in_section(string  $section, string  $key, mixed  $value, integer  $minutes) : void

Write a sectioned item to the cache.

Parameters

string $section
string $key
mixed $value
integer $minutes

Tags

None found

forever_in_section()

forever_in_section(string  $section, string  $key, mixed  $value) : void

Write a sectioned item to the cache that lasts forever.

Parameters

string $section
string $key
mixed $value

Tags

None found

remember_in_section()

remember_in_section(string  $section, string  $key, mixed  $default, integer  $minutes, string  $function = 'put') : mixed

Get a sectioned item from the cache, or cache and return the default value.

Parameters

string $section
string $key
mixed $default
integer $minutes
string $function

Returns

mixed

Tags

None found

sear_in_section()

sear_in_section(string  $section, string  $key, mixed  $default) : mixed

Get a sectioned item from the cache, or cache the default value forever.

Parameters

string $section
string $key
mixed $default

Returns

mixed

Tags

None found

forget_in_section()

forget_in_section(string  $section, string  $key) : void

Delete a sectioned item from the cache.

Parameters

string $section
string $key

Tags

None found

forget_section()

forget_section(string  $section) : integer|boolean

Delete an entire section from the cache.

Parameters

string $section

Returns

integer|boolean

abstract

Tags

None found

retrieve()

retrieve(string  $key) : mixed

Retrieve an item from the cache driver.

Parameters

string $key

Returns

mixed

abstract
Inherited from
LaravelCacheDriversDriver

Tags

None found

expiration()

expiration(integer  $minutes) : integer

Get the expiration time as a UNIX timestamp.

Parameters

integer $minutes

Returns

integer

Inherited from
LaravelCacheDriversDriver

Tags

None found

sectionable()

sectionable(string  $key) : boolean

Indicates if a key is sectionable.

Parameters

string $key

Returns

boolean

Tags

None found

sectioned()

sectioned(string  $key) : boolean

Determine if a key is sectioned.

Parameters

string $key

Returns

boolean

Tags

None found

parse()

parse(string  $key) : array

Get the section and key from a sectioned key.

Parameters

string $key

Returns

array

Tags

None found