IOS 开发 清理缓存封装(包括WebKit缓存/SDImageCache缓存)

文章开始前先贴个图看下app的沙盒路径:


网上搜索的清除缓存相关的文章清一色都有一个问题,就是只清理/Library/Caches目录文件,理论上来讲是没错,所有的缓存文件都会放在app沙盒目录的Caches文件目录下,这样的清理模拟器能通过,真机则会因为没有Snapshot的访问权限而中止清理。
所以实际应用中我们的计算缓存大小函数,以及清理函数需要跳过Snapshot这个文件目录,不讲目录文件大小计入缓存大小,清理的时候跳过该目录防止中断。

下面的内容引用于:
IOS 开发 Cache文件夹缓存的清理封装(包括WebKit缓存/SDImageCache缓存),都提供了相应的接口.

ClearCachesTool.h

//
//  ClearCachesTool.h
//  demo
//
//  Created by zhouyu on 2016/12/27.
//  Copyright © 2016年 demo. All rights reserved.
/*
 * 真机和模拟器下WKWebKit下载的图片资源缓存路径不一样
 * 真机:/Library/Caches/WebKit
 * 模拟器:/Library/Caches/cn.demo.demo/WebKit
 * cn.demo.demo是指APP的Boundle Identifier
 * 真机清理Cache缓存有坑,Snapshots文件夹无操作权限,导致清理失败,提供的方法中已经做了过滤处理
 */

#import <Foundation/Foundation.h>

@interface ClearCachesTool : NSObject

#pragma mark - 计算和清理Cache文件夹总缓存
/*s*
 *  获取Cache文件夹缓存的总大小(Snapshots除外,没有权限获取)
 *
 *  @param path 要获取的文件夹 路径
 *
 *  @return 返回path路径下文件夹的大小
 */
+ (NSString *)getCacheSize;

/**
 *  获取Cache文件夹缓存的总大小(Snapshots除外,没有权限获取)
 *  @return 是否清除成功
 */
+ (BOOL)clearCache;
+ (void)readyClearCache;


#pragma mark - 计算和清理指定路径文件夹总缓存
/*s*
 *  获取path路径下文件夹的大小
 *
 *  @param path 要获取的文件夹 路径
 *
 *  @return 返回path路径下文件夹的大小
 */
+ (NSString *)getCacheSizeWithFilePath:(NSString *)path;

/**
 *  清除path路径下文件夹的缓存
 *
 *  @param path  要清除缓存的文件夹 路径
 *
 *  @return 是否清除成功
 */
+ (BOOL)clearCacheWithFilePath:(NSString *)path;

#pragma mark - 计算和清理WebKit文件夹的WKWebKit总缓存
/*s*
 *  获取WKWebKit路径下文件夹的大小
 *  @return 返回WKWebKit路径下文件夹的大小
 */
+ (NSString *)getWKWebKitCacheSize;

/**
 *  清除WKWebKit路径下文件夹的缓存
 *  @return 是否清除成功
 */
+ (BOOL)clearWKWebKitCache;



#pragma mark - 计算和清理SDImageCache--default文件夹的总缓存
/*s*
 *  获取SDImageCache--default路径下文件夹的大小
 *  @return 返回WKWebKit路径下文件夹的大小
 */
+ (NSString *)getSDImageDefaultCacheSize;

/**
 *  清除SDImageCache--default路径下文件夹的缓存
 *  @return 是否清除成功
 */
+ (BOOL)clearSDImageDefaultCache;


#pragma mark - MAC电脑模拟器下计算和清理WebKit文件夹的WKWebKit总缓存
/*s*
 *  获取模拟器下WKWebKit路径下文件夹的大小
 *  @return 返回WKWebKit路径下文件夹的大小
 */
+ (NSString *)getSimulatorWKWebKitCacheSize;

/**
 *  清除模拟器下WKWebKit路径下文件夹的缓存
 *  @return 是否清除成功
 */
+ (BOOL)clearSimulatorWKWebKitCache;

@end

ClearCachesTool.m

//
//  ClearCachesTool.m
//  demo
//
//  Created by zhouyu on 2016/12/27.
//  Copyright © 2016年 demo. All rights reserved.
//

#import "ClearCachesTool.h"

@implementation ClearCachesTool

#pragma mark - 获取Cache文件夹大小
+ (NSString *)getCacheSize {
    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *totleSize = [ClearCachesTool getCacheSizeWithFilePath:cachesPath];
    return totleSize;
}

#pragma mark - 删除Cache文件夹中的缓存
+ (BOOL)clearCache {
    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    BOOL isAlreadyClearCache = [ClearCachesTool clearCacheWithFilePath:cachesPath];
    return isAlreadyClearCache;
}
+ (void)readyClearCache {
    BOOL isClearCache = [ClearCachesTool clearCache];
    if (isClearCache) {
        ZYLog(@"清理完毕");
    } else {
        ZYLog(@"清理失败");
    }
}

#pragma mark - 计算和清理WebKit文件夹的WKWebKit总缓存
+ (NSString *)getWKWebKitCacheSize {
    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *path = [cachesPath stringByAppendingPathComponent:@"/WebKit"];
    // 获取“path”文件夹下的所有文件
    NSArray *subPathArr = [[NSFileManager defaultManager] subpathsAtPath:path];
    NSString *filePath  = nil;
    NSInteger totleSize = 0;
    for (NSString *subPath in subPathArr){

        // 1. 拼接每一个文件的全路径
        filePath =[path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        // 2. 是否是文件夹,默认不是
        BOOL isDirectory = NO;
        // 3. 判断文件是否存在
        BOOL isExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
        // 4. 以上判断目的是忽略不需要计算的文件
        if (!isExist || isDirectory || [filePath containsString:@".DS"]){
            // 过滤: 1. 文件夹不存在  2. 过滤文件夹  3. 隐藏文件
            continue;
        }
        // 5. 指定路径,获取这个路径的属性
        NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
        /**
         attributesOfItemAtPath: 文件夹路径
         该方法只能获取文件的属性, 无法获取文件夹属性, 所以也是需要遍历文件夹的每一个文件的原因
         */
        // 6. 获取每一个文件的大小
        NSInteger size = [dict[@"NSFileSize"] integerValue];
        // 7. 计算总大小
        totleSize += size;
    }

    //8. 将文件夹大小转换为 M/KB/B
    NSString *totleStr = nil;
    if (totleSize > 1000 * 1000){
        totleStr = [NSString stringWithFormat:@"%.2fM",totleSize / 1000.00f /1000.00f];
    }else if (totleSize > 1000){
        totleStr = [NSString stringWithFormat:@"%.2fKB",totleSize / 1000.00f ];
    }else{
        totleStr = [NSString stringWithFormat:@"%.2fB",totleSize / 1.00f];
    }
    return totleStr;
}

+ (BOOL)clearWKWebKitCache {

    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *path = [cachesPath stringByAppendingPathComponent:@"/WebKit"];
    //拿到path路径的下一级目录的子文件夹
    NSArray *subPathArr = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
    NSString *filePath = nil;
    NSError *error = nil;
    for (NSString *subPath in subPathArr) {
        filePath = [path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        if (![filePath containsString:@"/Caches/Snapshots"]) {
            //删除子文件夹
            [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error];
        }
        if (error) {
            ZYLog(@"%@",error);
            return NO;
        }
    }
    return YES;
}

#pragma mark - 计算和清理SDImageCache--default文件夹的总缓存
+ (NSString *)getSDImageDefaultCacheSize {
    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *path = [cachesPath stringByAppendingPathComponent:@"/default"];
    // 获取“path”文件夹下的所有文件
    NSArray *subPathArr = [[NSFileManager defaultManager] subpathsAtPath:path];
    NSString *filePath  = nil;
    NSInteger totleSize = 0;
    for (NSString *subPath in subPathArr){

        // 1. 拼接每一个文件的全路径
        filePath =[path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        // 2. 是否是文件夹,默认不是
        BOOL isDirectory = NO;
        // 3. 判断文件是否存在
        BOOL isExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
        // 4. 以上判断目的是忽略不需要计算的文件
        if (!isExist || isDirectory || [filePath containsString:@".DS"]){
            // 过滤: 1. 文件夹不存在  2. 过滤文件夹  3. 隐藏文件
            continue;
        }
        // 5. 指定路径,获取这个路径的属性
        NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
        /**
         attributesOfItemAtPath: 文件夹路径
         该方法只能获取文件的属性, 无法获取文件夹属性, 所以也是需要遍历文件夹的每一个文件的原因
         */
        // 6. 获取每一个文件的大小
        NSInteger size = [dict[@"NSFileSize"] integerValue];
        // 7. 计算总大小
        totleSize += size;
    }

    //8. 将文件夹大小转换为 M/KB/B
    NSString *totleStr = nil;
    if (totleSize > 1000 * 1000){
        totleStr = [NSString stringWithFormat:@"%.2fM",totleSize / 1000.00f /1000.00f];
    }else if (totleSize > 1000){
        totleStr = [NSString stringWithFormat:@"%.2fKB",totleSize / 1000.00f ];
    }else{
        totleStr = [NSString stringWithFormat:@"%.2fB",totleSize / 1.00f];
    }
    return totleStr;
}

+ (BOOL)clearSDImageDefaultCache {

    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *path = [cachesPath stringByAppendingPathComponent:@"/default"];
    //拿到path路径的下一级目录的子文件夹
    NSArray *subPathArr = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
    NSString *filePath = nil;
    NSError *error = nil;
    for (NSString *subPath in subPathArr) {
        filePath = [path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        if (![filePath containsString:@"/Caches/Snapshots"]) {
            //删除子文件夹
            [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error];
        }
        if (error) {
            ZYLog(@"%@",error);
            return NO;
        }
    }
    return YES;
}

#pragma mark - 获取path路径下文件夹大小
+ (NSString *)getCacheSizeWithFilePath:(NSString *)path {

    // 获取“path”文件夹下的所有文件
    NSArray *subPathArr = [[NSFileManager defaultManager] subpathsAtPath:path];
    NSString *filePath  = nil;
    NSInteger totleSize = 0;
    for (NSString *subPath in subPathArr){
//        ZYLog(@"getCacheSize = %@",subPath);
        // 0. 把Snapshots文件夹过滤掉,没有访问权限,否则删除时操过200M会失败!!!!!!!!
        if (![subPath containsString:@"Snapshots"]) {
            // 1. 拼接每一个文件的全路径
            filePath =[path stringByAppendingPathComponent:subPath];
        }
        // 2. 是否是文件夹,默认不是
        BOOL isDirectory = NO;
        // 3. 判断文件是否存在
        BOOL isExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
        // 4. 以上判断目的是忽略不需要计算的文件
        if (!isExist || isDirectory || [filePath containsString:@".DS"]){
            // 过滤: 1. 文件夹不存在  2. 过滤文件夹  3. 隐藏文件
            continue;
        }
        // 5. 指定路径,获取这个路径的属性
        NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
        /**
         attributesOfItemAtPath: 文件夹路径
         该方法只能获取文件的属性, 无法获取文件夹属性, 所以也是需要遍历文件夹的每一个文件的原因
         */
        // 6. 获取每一个文件的大小
        NSInteger size = [dict[@"NSFileSize"] integerValue];
        // 7. 计算总大小
        totleSize += size;
    }

    //8. 将文件夹大小转换为 M/KB/B
    NSString *totleStr = nil;
    if (totleSize > 1000 * 1000){
        totleStr = [NSString stringWithFormat:@"%.2fM",totleSize / 1000.00f /1000.00f];
    }else if (totleSize > 1000){
        totleStr = [NSString stringWithFormat:@"%.2fKB",totleSize / 1000.00f ];
    }else{
        totleStr = [NSString stringWithFormat:@"%.2fB",totleSize / 1.00f];
    }
    return totleStr;
}

#pragma mark - 清除path文件夹下缓存大小--/Caches/Snapshots,真机测试会输出error
//Error Domain=NSCocoaErrorDomain Code=513 "未能移除“Snapshots”,因为您没有访问它的权限。"
+ (BOOL)clearCacheWithFilePath:(NSString *)path{

    //拿到path路径的下一级目录的子文件夹
    NSArray *subPathArr = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
    NSString *filePath = nil;
    NSError *error = nil;
    for (NSString *subPath in subPathArr) {
        filePath = [path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        if (![filePath containsString:@"/Caches/Snapshots"]) {
            //删除子文件夹
            [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error];
        }
        if (error) {
            ZYLog(@"%@",error);
            return NO;
        }
    }
    return YES;
}

#pragma mark - 模拟器下计算和清理WebKit文件夹的WKWebKit总缓存
+ (NSString *)getSimulatorWKWebKitCacheSize {
    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *identifier = [[NSBundle mainBundle] bundleIdentifier];
//    ZYLog(@"%@",identifier);
    NSString *path = [NSString stringWithFormat:@"%@/%@",cachesPath,identifier];
    path = [path stringByAppendingPathComponent:@"/WebKit"];
//    ZYLog(@"%@",path);
    // 获取“path”文件夹下的所有文件
    NSArray *subPathArr = [[NSFileManager defaultManager] subpathsAtPath:path];
    NSString *filePath  = nil;
    NSInteger totleSize = 0;
    for (NSString *subPath in subPathArr){

        // 1. 拼接每一个文件的全路径
        filePath =[path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        // 2. 是否是文件夹,默认不是
        BOOL isDirectory = NO;
        // 3. 判断文件是否存在
        BOOL isExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
        // 4. 以上判断目的是忽略不需要计算的文件
        if (!isExist || isDirectory || [filePath containsString:@".DS"]){
            // 过滤: 1. 文件夹不存在  2. 过滤文件夹  3. 隐藏文件
            continue;
        }
        // 5. 指定路径,获取这个路径的属性
        NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
        /**
         attributesOfItemAtPath: 文件夹路径
         该方法只能获取文件的属性, 无法获取文件夹属性, 所以也是需要遍历文件夹的每一个文件的原因
         */
        // 6. 获取每一个文件的大小
        NSInteger size = [dict[@"NSFileSize"] integerValue];
        // 7. 计算总大小
        totleSize += size;
    }

    //8. 将文件夹大小转换为 M/KB/B
    NSString *totleStr = nil;
    if (totleSize > 1000 * 1000){
        totleStr = [NSString stringWithFormat:@"%.2fM",totleSize / 1000.00f /1000.00f];
    }else if (totleSize > 1000){
        totleStr = [NSString stringWithFormat:@"%.2fKB",totleSize / 1000.00f ];
    }else{
        totleStr = [NSString stringWithFormat:@"%.2fB",totleSize / 1.00f];
    }
    return totleStr;
}

+ (BOOL)clearSimulatorWKWebKitCache {

    NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    NSString *identifier = [[NSBundle mainBundle] bundleIdentifier];
    //    ZYLog(@"%@",identifier);
    NSString *path = [NSString stringWithFormat:@"%@/%@",cachesPath,identifier];
    path = [path stringByAppendingPathComponent:@"/WebKit"];
    //    ZYLog(@"%@",path);
    //拿到path路径的下一级目录的子文件夹
    NSArray *subPathArr = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
    NSString *filePath = nil;
    NSError *error = nil;
    for (NSString *subPath in subPathArr) {
        filePath = [path stringByAppendingPathComponent:subPath];
//        ZYLog(@"%@",filePath);
        if (![filePath containsString:@"/Caches/Snapshots"]) {
            //删除子文件夹
            [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error];
        }
        if (error) {
            ZYLog(@"%@",error);
            return NO;
        }
    }
    return YES;
}

@end

使用DEMO:


WOCOSetMyInfosController.m

//
//  WOCOSetMyInfosController.m
//  demo
//
//  Created by zhouyu on 2016/12/27.
//  Copyright © 2016年 demo. All rights reserved.
//

#import "WOCOSetMyInfosController.h"
#import "ClearCachesTool.h"
#import "SVProgressHUD.h"

@interface WOCOSetMyInfosController ()
/**
 *  caches文件夹下缓存大小
 */
@property (nonatomic, copy) NSString *cachesSize;
@end

@implementation WOCOSetMyInfosController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.navigationItem.title = @"设置";
    self.tableView.backgroundColor = [UIColor whiteColor];
    self.tableView.scrollEnabled = NO;
    [self getCachesSize];
}

#pragma mark - 获取Caches文件夹缓存大小
- (void)getCachesSize {
    // 子线程计算文件缓存
    dispatch_async(dispatch_get_global_queue(0, 0), ^{

        NSString *cachesSize = [ClearCachesTool getCacheSize];
        self.cachesSize = cachesSize;
        // 主线程更新显示
        dispatch_async(dispatch_get_main_queue(), ^{
            NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
            UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
            cell.detailTextLabel.text = cachesSize;
            [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
            [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
        });

    });
}

#pragma mark - 删除Caches文件夹缓存
- (void)clearCaches {
    // 子线程做删除耗时操作
    if (self.cachesSize == nil) {
        return;
    }
    NSString *message = [NSString stringWithFormat:@"缓存大小为%@,确定要清理吗?",self.cachesSize];

    UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
    UIAlertAction *certain = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        [SVProgressHUD showWithStatus:@"正在拼命清理中..."];

        dispatch_async(dispatch_get_global_queue(0, 0), ^{
            [ClearCachesTool clearCache];
            // 主线程刷新显示
            dispatch_async(dispatch_get_main_queue(), ^{
                [SVProgressHUD dismiss];
                NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
                UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
                self.cachesSize = nil;
                cell.detailTextLabel.text = @"清理完毕";
                [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
                [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
            });
        });
    }];
    [alertC addAction:cancel];
    [alertC addAction:certain];
    [self presentViewController:alertC animated:YES completion:nil];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (indexPath.row == 0) {
        [self clearCaches];
    }
}

#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:ID];
    }

    if (indexPath.section == 0 && indexPath.row == 0) {
        cell.textLabel.text = @"清理缓存";
        cell.detailTextLabel.text = @"正在计算中...";
    }else {
        cell.textLabel.text = [NSString stringWithFormat:@"%ld",(long)indexPath.section];
        cell.detailTextLabel.text = @"^_^";
    }
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    return cell;
}
@end


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,560评论 4 361
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,104评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,297评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,869评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,275评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,563评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,833评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,543评论 0 197
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,245评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,512评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,011评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,359评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,006评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,062评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,825评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,590评论 2 273
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,501评论 2 268

推荐阅读更多精彩内容

  • *面试心声:其实这些题本人都没怎么背,但是在上海 两周半 面了大约10家 收到差不多3个offer,总结起来就是把...
    Dove_iOS阅读 27,036评论 29 470
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,099评论 18 139
  • 需求 缓存计算、缓存清理。 技术点 沙盒是什么 沙盒简单来说就是一个应用程序独有的存储和读取内容的地方,这个地方本...
    YY程序猿阅读 7,428评论 0 12
  • 清理缓存概观 清理缓存就是清理沙盒里非代码文件 沙盒:iOS系统为每一个应用程序创建一个文件目录,是一个的独立,封...
    温学振阅读 6,098评论 0 6
  • 傻狗
    razor51阅读 297评论 0 1