What Jonas said, but we do have the syntax to choose the storage type:
indexedDB.open("myDb", { version:1, storage: "temporary" });
or you meant something else ?
Jan
On Tue, Sep 17, 2013 at 4:10 AM, Jonas Sicking <[email protected]> wrote:
> On Sep 5, 2013 5:35 AM, "Honza Bambas" <[email protected]> wrote:
> >
> > Should b2g have a global cache directory? Android has a folder whom path
> is gived to an app via its Context (or what is the name of the interface).
> This folder content or individual files can be in any time deleted by the
> OS (android) when low on disk space. The data in it are considered
> volatile, so only used for caching.
> >
> > Should we have some kind of this functionality too?
> >
> > E.g. for the new http cache backend we use andoid's cache dir and thus we
> don't need any sophisticated eviction algorithm. It can make the code less
> complex and takes some of the resposibility off an app coder.
> >
> >
> > And in relation to "Low device storage (notifying the user)" thread - is
> there a way an app can say its data is critical (e.g. sms, email when
> removing mails from the server, contacts)? We could just delete the
> non-critical apps data when needed.
>
> In addition to Fernando's answer, we are also adding support for
> "temporary" and "persistent" data for storage APIs. With "temporary" being
> non-critical data that the platform can remove whenever low on disk space.
>
> I.e. we will allow an application to choose if a given IDB database should
> be "persistent" or "temporary".
>
> The back end for this just landed a few days ago, with IDB being the first
> user of this back end. We still don't have syntax for allowing an author to
> control which type of data a given database is though.
>
> I would like to see localStorage integrate with the same back end
> eventually.
>
> And new APIs like navigation controller and sandboxed filesystem should
> definitely be written to make use of the back end.
>
> It is not clear to me if putting something like the http cache in the same
> temporary storage back end is a good idea though.
>
> / Jonas
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
>
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g