GithubHelp home page GithubHelp logo

Comments (8)

ChocoChipset avatar ChocoChipset commented on June 2, 2024

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?

from sptpersistentcache.

sgl0v avatar sgl0v commented on June 2, 2024

@iOSCowboy , I'll start working on this if there are not objections. I would be nice to have a backward compatible solution I guess.

from sptpersistentcache.

ChocoChipset avatar ChocoChipset commented on June 2, 2024

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!

from sptpersistentcache.

dflems avatar dflems commented on June 2, 2024

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 NSUserDefaults (or something like that) and if the version ever changes, we invalidate the entire cache. A solid migration strategy is something we should figure out otherwise we're locked in.

from sptpersistentcache.

8W9aG avatar 8W9aG commented on June 2, 2024

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

from sptpersistentcache.

dflems avatar dflems commented on June 2, 2024

@8W9aG: Many filesystems support extended file attributes (wiki). Would probably be more trouble than it's worth to cleanly support all of them, but it is possible to make a cross-platform core provided the FS supports extended file attributes.

from sptpersistentcache.

ChocoChipset avatar ChocoChipset commented on June 2, 2024

Thanks for the input, team.

Looks like this would be an awesome PR, @sgl0v!

from sptpersistentcache.

sgl0v avatar sgl0v commented on June 2, 2024

Thanks for clarification, guys. Will start working on this improvement then.

from sptpersistentcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.