You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
passing ttlCache:YES here only enables ttlCache for the disk cache, the memory cache is still set up as a non-ttl cache.
This can be corrected after the fact with PINMemoryCache: - (void)setTtlCache:(BOOL)ttlCache DEPRECATED_MSG_ATTRIBUTE("ttlCache is no longer a settable property and must now be set via initializer."); but, this is unintuitive, and as you can see this method is marked as deprecated.
The text was updated successfully, but these errors were encountered:
Agreed, it's confusing - I ran into issues once I adopted it - my previous custom cache started deleting the disk cache upon instantiation of the Manager. I think because I hadn't adopted the optional Protocol.
Also, shouldn't there be away to turn on TTL for the shared cache of the default Manager? otherwise it's impossible to get ageLimit working.
- (instancetype)initWithName:(nonnull NSString *)name rootPath:(nonnull NSString *)rootPath serializer:(nullable PINDiskCacheSerializerBlock)serializer deserializer:(nullable PINDiskCacheDeserializerBlock)deserializer keyEncoder:(nullable PINDiskCacheKeyEncoderBlock)keyEncoder keyDecoder:(nullable PINDiskCacheKeyDecoderBlock)keyDecoder ttlCache:(BOOL)ttlCache NS_DESIGNATED_INITIALIZER;
passing
ttlCache:YES
here only enables ttlCache for the disk cache, the memory cache is still set up as a non-ttl cache.This can be corrected after the fact with PINMemoryCache:
- (void)setTtlCache:(BOOL)ttlCache DEPRECATED_MSG_ATTRIBUTE("ttlCache is no longer a settable property and must now be set via initializer.");
but, this is unintuitive, and as you can see this method is marked as deprecated.The text was updated successfully, but these errors were encountered: