Refreshing Cached Results

While rare,there may be times where the cache on a user's device fills up, or causes the answerSpace to display outdated information.

You may also wish to force refresh the cache in preparation for another Interaction.

You can do this by creating an Interaction (hidden or unhidden) that has the following code:

$intival_seconds = 15 * 60;
$lastFetchTime = $t->getJourneyObject('lastFetchTime');
if($lastFetchTime + $intival_seconds < time()){
// fetch + rows code here
// $t->fetch();
// $t->rows();
$t->setJourneyObject('lastFetchTime', time());
$t->setJourneyObject('data', $t->result);
}
else {
$t->result = $t->getJourneyObject('data');
}