interface Illuminate / Contracts / Cache / Repository
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Repository

Methods

public

pull ( $key , $default ) : mixed

Retrieve an item from the cache and delete it.

Parameters

  • $key string
  • $default mixed
public

put ( $key , $value , $ttl ) : bool

Store an item in the cache.

Parameters

public

add ( $key , $value , $ttl ) : bool

Store an item in the cache if the key does not exist.

Parameters

public

increment ( $key , $value ) : int|bool

Increment the value of an item in the cache.

Parameters

  • $key string
  • $value mixed
public

decrement ( $key , $value ) : int|bool

Decrement the value of an item in the cache.

Parameters

  • $key string
  • $value mixed
public

forever ( $key , $value ) : bool

Store an item in the cache indefinitely.

Parameters

  • $key string
  • $value mixed
public

remember ( $key , $ttl , Closure $callback ) : mixed

Get an item from the cache, or execute the given Closure and store the result.

Parameters

public

sear ( $key , Closure $callback ) : mixed

Get an item from the cache, or execute the given Closure and store the result forever.

Parameters

public

rememberForever ( $key , Closure $callback ) : mixed

Get an item from the cache, or execute the given Closure and store the result forever.

Parameters

public

forget ( $key ) : bool

Remove an item from the cache.

Parameters

  • $key string
public

getStore ( ) : Store

Get the cache store implementation.