static GHCache *instance = nil;
/**
* 单例,静态初始化方法
*
* @return 返回一个单例
*/
+ (GHCache*)shareCache{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}
static GHCache *instance = nil;
/**
* 单例,静态初始化方法
*
* @return 返回一个单例
*/
+ (GHCache*)shareCache{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}