1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
464 views
by brandon-w-8204 (34.1k points)

1 Answer

+1 vote

Here is some code on how to test messageCache:

//Test if a messageCache Exists.
var result = messageCache.getValue('doesNotExist');
var string = '';
if (result) {
   string += '"' + result + '" equals: true';
} else {
   string += '"' + result + '" equals: false';
}
 
qie.debug('Returned if you getValue of a messageCache does not exist:\n' + result + '\n' + string);
 
//Using a default value of notFound
result = messageCache.getValue('doesNotExist', 'notFound');
string = '';
if (result != 'notFound') {
   string += 'messageCache Value "doesNotExist" is not found';
} else {
   string += 'messageCache Value "doesNotExist" is found';
}
 
qie.debug('Returned if you getValue of a messageCache does not exist:\n' + result + '\n' + string);
by brandon-w-8204 (34.1k points)
...