rodydavis/http_get_cache

Quick question

Closed this issue · 3 comments

Hey Rody,

This is a super helpful looking package. I always enjoy checking out the cool things you’re working on with Flutter and Lit.

I just wanted to ask what drove the decision to make this a Flutter package specifically rather than a Dart one that could be used in Flutter. I imagine there are a bunch of non Flutter use cases that could benefit from this kind of functionality.

Anyways thanks again in the meantime. Hope you’re doing well!

It totally can work with dart! I just have to clean up some of the imports. But it just needs a drift SQLite database or custom store that you can provide.

I made it agnostic so you could use other storage mechanisms too!

Coming from the Web world I didn't see or find a package that worked off of the HTTP standards for caching and I wanted to have something that would be isomorphic across flutter Web using the fetch API package and mobile and desktop.

It really does change the way you program if you're cashing is persisted and can be revalidated under certain periods of time. It's even fault taller against errors and you can easily skip the cash by specifying the normal cash control headers like no-cache.

In my packages, I like to make it so you can import it into a dart or flutter.

Even though it has a dependency on the Flutter SDK, I usually provide an import safe to use on Dart native platforms (eg. signals)!

Really appreciated the thoughtful reply and context. Thanks again.