TwistPHP Documentation


File path: dist/twist/Core/Utilities/Cache.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

writeStore data in the cache, default life time is 1 hour (3600 seconds). Setting the life time to '0' will mean that the cache will be stored as a PHP Runtime Session and will be no longer exists once the current runtime has ended.
A Unique ID must be passed in so that you can reference the data again later.


Name Type Description
[$intLifeTime = 3600]integern/a

Return Values

void — No return information has been documented for this function.


//Set the variables for the example
$mxdUniqueID 'foo-123';
$mxdData 'foo-123';
$intLifeTime 3600;

//Call the function write with the example vars
Twist::Cache() -> write($mxdUniqueID$mxdData$intLifeTime);