YH_DNSCacheManager.h 808 Bytes
//
//  YH_DNSCacheManager.h
//  YH_Mall
//
//  Created by jhsonzhi on 16/7/18.
//  Copyright © 2016年 YOHO. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YH_DNSUtils.h"
#import "YH_DNSHttpDnsPack.h"


@protocol YHDNSCacheProtocol <NSObject>

- (void)addMemoryCache:(NSString *)hostName model:(YH_DNSDomainModel *)model;
- (NSDictionary *)getDnsCacheByHost:(NSString *)hostName;
- (YH_DNSDomainModel *)insertDnsCache:(YH_DNSHttpDnsPack *) dnsPack;
- (NSArray *)getExpireDnsCache;
- (NSArray *)getAllModels;
//本地方式获取URL的行为
//- (void)updateMemoryCache:(NSString *)domain model:(YH_DNSDomainModel *)model;

- (void)clear;
- (void)clearDB;
- (void)clearMemoryCache;

@end

@interface YH_DNSCacheManager : NSObject<YHDNSCacheProtocol>
+ (instancetype)sharedInstance;
@end