Results 1 to 4 of 4

Thread: how to cache Ext.data.store post or get request in extjs 3.4

  1. #1
    Sencha User
    Join Date
    Feb 2013
    Location
    INDIA
    Posts
    51
    Vote Rating
    0
      0  

    Default how to cache Ext.data.store post or get request in extjs 3.4

    hi ,

    i have ext.data .store i want to load it first time after that its load data from cache not loading the ajax call .
    here is my code in where i have using it.

    new Ext.data.Store({
    autoLoad:true,
    proxy: new Ext.data.HttpProxy({
    url: '../xxxxxxxx/xxxxxx',
    timeout :12000,
    }),
    reader: new Ext.data.JsonReader({

    } ),

    });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Why are you loading it after the first time then? Simply don't load the store. Or are you wanting to cache the url and have multiple stores get the cached data from when one of the stores loads?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    INDIA
    Posts
    51
    Vote Rating
    0
      0  

    Default

    thanks for reply .


    but i want to load the store only one time after that if i refresh the store for the same parameter . its load the data from cache . when i change the parameter its go the back-end and load the data again .

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
      0  

    Default

    Store the original response in a variable somewhere, then on reload simply return false in the beforeload store event, and load in the data stored in the variable instead?

    In fact, isn't this already stored anyway underneath the reader?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •