Where does ExtJS's store keeps all the data
-
26-12-2019 - |
Question
I want to know where does ExtJS store keeps all the data? I know the data is stored in the memory but I want to know does it used HTML 5 local storage internally or if any other technique is employed?
Thanks, Deepesh
Solution
It depends.
In every case, the data of the store is stored in a Javascript object. The store persists its data via a proxy. It is a matter of configuration how this data is stored. You can configure different types of proxies:
Client side storage
- LocalStorageProxy - saves its data to localStorage if the browser supports it
- SessionStorageProxy - saves its data to sessionStorage if the browsers supports it
- MemoryProxy - holds data in memory only, any data is lost when the page is refreshed
Server side storage
- Ajax - sends requests to a server on the same domain
- JsonP - uses JSON-P to send requests to a server on a different domain
- Rest - uses RESTful HTTP methods (GET/PUT/POST/DELETE) to communicate with server
- Direct - uses Ext.direct.Manager to send requests
More details are in the docs.
OTHER TIPS
The data is stored in an in memory collection called a MixedCollection
. It's an ordered collection, but it also allows you to look up data by key, so it's like having an ordered hashmap.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow