System:Cache:getData
From Aspen Documentation
Returns data from the cache file.
We pass our original identification key so that the system can pull the right file from the cache. It will automatically determine the original datatype and will return the data in that type. Arrays and objects will be unserialized.
If the expiration time has passed, it will return false.
To cache the output of templates displayed through the Template class, set the config parameter cache_template_output to true;
Since 1.0
Contents |
Arguments
mixed getData (string $key)
- key
- The data identification key used in the put command.
Returns
Returns mixed types. If the data was an array or an object it will be returned in it's original format.
Notes
- As noted in bug 1231, we're working on expanding the data type / casting functions of the return value. If you wrote an integer to the cache file, we want to return an integer-casted value to you. Right now, it will be returned as a string unless it's an array or object.
- As noted in bug 1125, certain internal php objects like SimpleXML objects do not serialize and unserialize properly.