TwistPHP Documentation

write

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.

Parameters

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

Return Values

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

Example

<?php
//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);