952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
26 lines
644 B
PHP
26 lines
644 B
PHP
<?php
|
|
/**
|
|
* testCacheSmash.php
|
|
*
|
|
* Test Stub for check the cacheMash() and smashCache() methods and returns from both method
|
|
*
|
|
*/
|
|
|
|
// initialization
|
|
require_once(dirname(__DIR__) . '/config/sneakerstrap.inc');
|
|
|
|
$tokens = null;
|
|
$errors = [];
|
|
$maxKeys = mt_rand(100, 200);
|
|
for ($index = 0; $index < $maxKeys; $index++)
|
|
$tokens[] = [ guid() => 'this is a test'];
|
|
|
|
// call multi-cache to cache
|
|
$keyList = gasCache::cacheMash($tokens, NUMBER_CACHE_DEFAULT, $errors);
|
|
if (is_null($keyList)) exit ('cache mash failed');
|
|
|
|
// call cache-smash to remove records
|
|
if (!gasCache::smashCache($keyList, $errors)) exit('smash cache failed');
|
|
|
|
$x = 1;
|