Sunday, 15 September 2013

store.load() triggers read + create

store.load() triggers read + create

I'm developing a app where a list is automatically refreshed every 15 sec.
To do so, I load the store every 15 sec from server (sending the params)
via php page linked to a postgreSQL DB. So far, so good, and it works OK.
Buy I have noticed that every time the store is loaded, it sends two
requests to the server (read + create). While the read request is
necessary to load new elements to the store, the create is completely
useless, because it sends the whole store as payload and receives nothing
making use of the network for nothing. How can I make the store to read,
and only read, from the server when it loads?
Thanks

No comments:

Post a Comment