-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Extended File Attributes to Store Cache Record's Header #64
Comments
Interesting idea, This would also allow files to be shared or inspected just like any other file using Finder or Preview, etc. If nobody objects, this could be a good idea for a PR. Interested, @sgl0v? |
@iOSCowboy , I'll start working on this if there are not objections. I would be nice to have a backward compatible solution I guess. |
Let's ping the gang and see what are their thoughts about it. Summoning @spotify/objc-dev! Regarding backward compatibility: the life of the files in the cache is short lived, might be enough just to flush the cache at the beginning (just brainstorming, but I think the solution is something fairly simple). Thanks for your interest, Max! |
As far as backwards compatibility goes, we could have a "cache protocol version" that factors into the cache key. We bump that version whenever serialization changes in a breakable way and forces the cache keys to be different. And/or we store the serialization version for the cache ID in |
We originally didn't do this because we were considering making the cache in C with a small Objective-C wrapper on top, making a major use case to support POSIX systems. Having said that, thats not the way it panned out, and so I think it's perfectly acceptable to add extended file attributes to the cache for the metadata. Backwards compatibility unfortunately will be required, we have some offlined files using the persist mode, and it would be a shame if we nuked them for our users |
Thanks for the input, team. Looks like this would be an awesome PR, @sgl0v! |
Thanks for clarification, guys. Will start working on this improvement then. |
Did you consider using Extended File Attributes to store a cache record's header (
SPTPersistentCacheRecordHeader
struct) ? Looks like this approach should simplify the headers management a bit.The text was updated successfully, but these errors were encountered: