use StaticCache;
StaticCache::set('foo', 'bar');
//默认该变量可以被释放,也可设置不释放。使用情况:在使用Async服务中,会涉及静态变量释放的问题。
StaticCache::set('foo', 'bar', false);
use StaticCache;
StaticCache::get('foo'); //return bar
use StaticCache;
//刷新可释放的静态变量
StaticCache::flush();
use StaticCache;
//刷新所有静态变量
StaticCache::flushAll();