{"action":"created","issue":{"url":"https://api.github.com/repos/ibireme/YYCache/issues/42","repository_url":"https://api.github.com/repos/ibireme/YYCache","labels_url":"https://api.github.com/repos/ibireme/YYCache/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/ibireme/YYCache/issues/42/comments","events_url":"https://api.github.com/repos/ibireme/YYCache/issues/42/events","html_url":"https://github.com/ibireme/YYCache/issues/42","id":145883454,"number":42,"title":"YYDiskCache 再次初始化的时候，会清除原有数据","user":{"login":"pylee","id":965874,"avatar_url":"https://avatars.githubusercontent.com/u/965874?v=3","gravatar_id":"","url":"https://api.github.com/users/pylee","html_url":"https://github.com/pylee","followers_url":"https://api.github.com/users/pylee/followers","following_url":"https://api.github.com/users/pylee/following{/other_user}","gists_url":"https://api.github.com/users/pylee/gists{/gist_id}","starred_url":"https://api.github.com/users/pylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pylee/subscriptions","organizations_url":"https://api.github.com/users/pylee/orgs","repos_url":"https://api.github.com/users/pylee/repos","events_url":"https://api.github.com/users/pylee/events{/privacy}","received_events_url":"https://api.github.com/users/pylee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T04:23:29Z","updated_at":"2016-04-05T06:37:01Z","closed_at":null,"body":"作者你好，在使用YYDiskCache时，再次初始化YYDiskCache，传入原有路径会清除原有数据？这种情况如何再次初始化原有路径的老数据呢？或者有其他使用方法？谢谢。"},"comment":{"url":"https://api.github.com/repos/ibireme/YYCache/issues/comments/205674375","html_url":"https://github.com/ibireme/YYCache/issues/42#issuecomment-205674375","issue_url":"https://api.github.com/repos/ibireme/YYCache/issues/42","id":205674375,"user":{"login":"ibireme","id":839283,"avatar_url":"https://avatars.githubusercontent.com/u/839283?v=3","gravatar_id":"","url":"https://api.github.com/users/ibireme","html_url":"https://github.com/ibireme","followers_url":"https://api.github.com/users/ibireme/followers","following_url":"https://api.github.com/users/ibireme/following{/other_user}","gists_url":"https://api.github.com/users/ibireme/gists{/gist_id}","starred_url":"https://api.github.com/users/ibireme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibireme/subscriptions","organizations_url":"https://api.github.com/users/ibireme/orgs","repos_url":"https://api.github.com/users/ibireme/repos","events_url":"https://api.github.com/users/ibireme/events{/privacy}","received_events_url":"https://api.github.com/users/ibireme/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T06:37:01Z","updated_at":"2016-04-05T06:37:01Z","body":"这就不太清楚了，可能需要具体调试一下。。\r\n\r\n试试改一下 YYDiskCache.m，在 `YYKVStorage *kv = [[YYKVStorage alloc] initWithPath:path type:type];` 之后，设置一下 `kv.errorLogsEnabled = YES;` 看看是否有什么错误日志。\r\n\r\n另外，如果传入相同的 cache name 或 path 来初始化 YYDiskCache，并且内存中已经有同名/同路径的实例，那就会直接返回那个对应实例，用来保证对于每个 path 最多只有一个实例来进行操作。不清楚这个会不会影响到你的代码逻辑。"}}