1

我想知道 ExtJS 将所​​有数据存储在哪里?我知道数据存储在内存中,但我想知道它是在内部使用 HTML 5 本地存储还是使用了任何其他技术?

谢谢,迪普什

4

2 回答 2

4

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.

于 2013-11-18T10:08:09.843 回答
1

数据存储在称为 a 的内存集合中MixedCollection。它是一个有序集合,但它也允许您通过键查找数据,所以它就像有一个有序的 hashmap。

于 2013-11-18T10:03:49.213 回答