YYCache icon indicating copy to clipboard operation
YYCache copied to clipboard

High performance cache framework for iOS.

Results 83 YYCache issues
Sort by recently updated
recently updated
newest added

freeDiskSpaceLimit 最大缓存大小吧? 这个缓存大小好像是YYCache框架缓存的总大小么? 当前用YY缓存两个文件夹,能分别控制这两个文件夹的大小么?

``` - (void)trimToCount:(NSUInteger)count { if (count == 0) { [self removeAllObjects]; return; } [self _trimToCount:count]; } ``` 此处会先判断 **count** 的值是否为 **0**,若为 **0** 则直接调用 `- removeAllObjects` 方法。但其实在 `- _trimToCount :` 方法中也会去判断...

你好,我看你源码里MemoryCahce里有关于Cost、Count和Age的清理策略,这里TrimCost应该怎么理解呢?我认为可以是自己定义的指标,但是我看它的清理策略是清理双向链表的尾部节点,所以即使我们自己定义了指标但是也没啥意义啊,它影响不了清理策略呢。

请问下,如果把YYCache做成全局单例,这时候如果没有设置cost,那memory cache 是不是会造成内存一直增加不释放的情况。

接口- (BOOL)saveItemWithKey:(NSString *)key value:(NSData *)value filename:(nullable NSString *)filename extendedData:(nullable NSData *)extendedData; 的注释里提到 If the `type` is YYKVStorageTypeSQLite, then the `filename` will be ignored. 但是 filename并没有被无视,而是依然使用filename写到文件中了。

YYMemoryCache ,CountLimit设置为10000,ShouldRemoveAllObjectsWhenEnteringBackground设置为NO,其他为默认,当缓存的对象数达到1500个以上时就会变得很慢,CPU占用率很高,iphone6这种比较新的机器能恢复过来,在5或者5s上比较难恢复,会卡一段时间。将CountLimit设置的比较小的时候没有这个问题。不知道是不是我使用的问题。

你好!今天尝试用YYCache缓存一个模型!结果取的时候模型对象指针存在,但对应属性为空?于是就去这样设置下 ``` //SelectShop.h @interface SelectShop : NSObject ``` ``` //SelectShop.m @implementation SelectShop -(instancetype)initWithCoder:(NSCoder *)aDecoder { if (self = [super init]) { self.name = [aDecoder decodeObjectForKey:@"name"]; } return self; } -(void)encodeWithCoder:(NSCoder...

YYDiskCache.m中121行 - (void)_trimToAge:(NSTimeInterval)ageLimit { if (ageLimit

YY大神, 我是这样理解的, countLimit是从节点的个数这个粒度上来限制缓存大小. 但是costLimit是从哪个纬度上来细分的呢?还是我理解得有错误?

怎么一次取出所有objects?