llfbandit / dio_cache_interceptor

Dio HTTP cache interceptor with multiple stores respecting HTTP directives (ETag, Last-Modified, Cache-Control) with options.
https://pub.dev/packages/dio_cache_interceptor
120 stars 70 forks source link

Make clear DB on open optional #156

Closed beerline closed 5 months ago

beerline commented 5 months ago

Thank u for such a useful library!

This library can be used for offline mode if make clean db on open optionally.

How it is implemented now

each time on db open plugin clears db (at least isar implementation)

Proposal feature

make clear db on open db optional

llfbandit commented 5 months ago

DB is only cleared from obsolete entries

beerline commented 5 months ago

@llfbandit isar clearing on open

https://github.com/llfbandit/dio_cache_interceptor/blob/c73e8950fc98ae2924b6d4169c3ff2c6d9819466/dio_cache_interceptor_isar_store/lib/src/store/dio_cache_interceptor_isar_store.dart#L168