-
25 Mar 2012 7:45 AM #1
Unanswered: application cache, sencha 2
Unanswered: application cache, sencha 2
Hello,
I have a question about the cache and sencha touch 2. I create an application project with sencha command. Normally, the app.json will automatically create a cache.manifest if i understand?
but when I look at the application resources in the safari console, I have an applicationCache empty. it should contain index.html page no?
please help.
-
26 Mar 2012 1:24 AM #2
Well, that's because you're still testing/debugging. It would be frustrating if your cache kicks in while your making changes. So when you run your production build via the sencha command then it'll create your manifest.
-
26 Mar 2012 1:41 AM #3
thank you,
I have another question about the cache,in fact, I have data that I load form json file,
I want to store its data locally after loading for offline use. is cache manifest is enough for this, or I have to create a localStorage store?
-
26 Mar 2012 1:42 AM #4
You have to create a store for that. The application manifest just downloads all data, but doesn't do anything about it.
-
26 Mar 2012 1:49 AM #5
OK,
Currently,I have a store that load data from a json file.
but I dont know where to place the localStorage store,or how to handle it.
here is the code for my store:
can you give mea little explanation about how to do it,or an example...Code:Ext.define('Jannonce.store.Annonces', { extend: 'Ext.data.Store', id: 'annonceS', config: { model: 'Jannonce.model.Annonce', sorters: 'rubriqueC3', grouper: function (record) { return record.get('rubriqueC3'); }, proxy: { type: 'ajax', url: 'data/annonces.json', reader: { type: 'json', model: 'Jannonce.model.Annonce' }, }, autoLoad: true, } });
thanks!


Reply With Quote