pinterest / PINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift Codable Structs

brurend opened this issue · comments

PINCache isn't compatible with Codable, right? Since setObject methods needs an NSCoding object.

Is this compatibility on your roadmap? Or there is anyway I can work around this problem?

if it's codable, what's wrong with just encoding it to NSData before caching the object?

JSONEncoder.init().encode(myCodableObject) as NSData