YYCache
YYCache copied to clipboard
High performance cache framework for iOS.
删除数据时可以使用removeAllCacheValueWithProgressBlock获取到进度,保存时如何获取保存进度呢?
类中包含readlony属性,并且实现get方法时,取出的缓存为空
 看堆栈,有字典和数组的dealloc函数调用,目测是这里的崩溃: ` if (!object) { [self removeObjectForKey:key]; return; } ` 不过不太明白为什么会有野指针访问?
个人看源码觉得这个属性值的使用代码有误。 表里last_access_time字段存的是操作数据时候的时间戳。但是removeItemsEarlierThanTime方法里,传的参数是当前时间戳与agelimit的差值。 因此,查询sql语句里 select filename from manifest where last_access_time < ?1 and filename is not null; 查到的过期文件就有问题。
The disk cache's totalCost was not calculated correctly after caching a 88.2 MB mp4 file and a 3.92 GB mp4 file. The files were wrote into disk successfully but the...
``` -[YYKVStorage _dbGetItemWithKey:excludeInlineData:] line:380 sqlite query error (10): disk I/O error -[YYKVStorage _dbGetItemWithKey:excludeInlineData:] line:380 sqlite query error (10): disk I/O error -[YYKVStorage _dbGetItemWithKey:excludeInlineData:] line:380 sqlite query error (10): disk I/O...
提一个小小的疑问
请教一下YY,YYDiskCache和Realm/CoreData这些相比,一个是磁盘缓存,一个是数据库,他们到底有什么区别?一直没法清晰的区分,还请不吝赐教~万分感激!
你好,我这边使用过程中碰到个问题想请教下。 由于我这边app某个页面刷新的时候会频繁读写数据,频繁的读写导致沙盒下的Library大小增大,查找了下主要是由于manifest.sqlite-wal这个文件增大过快,每次刷新会导致8M或者更多的空间占用。 如果我这把YYKVStorage这个文件下的以下代码片段的journal_mode模式改为OFF,是否会影响到现有的使用?`NSString *sql = @"pragma journal_mode = wal; pragma synchronous = normal; create table if not exists manifest (key text, filename text, size integer, inline_data blob, modification_time integer, last_access_time...
一处代码问题
 这里当`cost`超出限制时,会调用`trimToCost:`进行删除,但是这是一个异步操作,下面的代码会同时进行。如果`count`也超出限制,不就两处删除一起执行了吗?这样应该有问题吧