Scrapbook

Item
in package
implements CacheItemInterface

Representation of a cache item, both existing & non-existing (to be created).

Tags
author

Matthias Mullie [email protected]

copyright

Copyright (c) 2014, Matthias Mullie. All rights reserved.

license

MIT License

Table of Contents

Interfaces

CacheItemInterface
CacheItemInterface defines an interface for interacting with objects inside a cache.

Methods

__construct()  : mixed
__destruct()  : mixed
When this item is being killed, we should no longer keep its value around in the repository. Free up some memory!
exists()  : mixed
{@inheritdoc}
get()  : mixed
Retrieves the value of the item from the cache associated with this object's key.
getExpiration()  : mixed
{@inheritdoc}
getKey()  : string
Returns the key for the current cache item.
isHit()  : bool
Confirms if the cache item lookup resulted in a cache hit.
set()  : static
Sets the value represented by this cache item.
setExpiration()  : mixed
{@inheritdoc}

Methods

__construct()

public __construct(string $key, Repository $repository) : mixed
Parameters
$key : string
$repository : Repository

__destruct()

When this item is being killed, we should no longer keep its value around in the repository. Free up some memory!

public __destruct() : mixed

exists()

{@inheritdoc}

public exists() : mixed

get()

Retrieves the value of the item from the cache associated with this object's key.

public get() : mixed
Return values
mixed

The value corresponding to this cache item's key, or null if not found.

getExpiration()

{@inheritdoc}

public getExpiration() : mixed

getKey()

Returns the key for the current cache item.

public getKey() : string
Return values
string

The key string for this cache item.

isHit()

Confirms if the cache item lookup resulted in a cache hit.

public isHit() : bool
Return values
bool

True if the request resulted in a cache hit. False otherwise.

set()

Sets the value represented by this cache item.

public set(mixed $value) : static
Parameters
$value : mixed

The serializable value to be stored.

Return values
static

The invoked object.

setExpiration()

{@inheritdoc}

public setExpiration([mixed $ttl = null ]) : mixed
Parameters
$ttl : mixed = null

        
On this page

Search results