Navigation

Search

cache_get_data

Description

Pulls the specified variable from the cache.

Syntax

mixed cache_get_data (string $key[, int $ttl])



Parameter $key

Expected type: String
Description: The name of the item in the cache (should be the same as what was passed to cache_put_data)



Parameter $ttl

Expected type: Integer
Description: The maximum desired lifetime for the item. If the item is older than this, it won't be pulled. Defaults to 120



Return value

Expected type: Mixed
Description:

Possible types
Allowed values Description
Null Returns null if there was a problem or the value wasn't found in the cache
Array The data that was stored for this key


View all versions of this function