Opened 11 years ago
Closed 9 years ago
#12968 closed defect (wontfix)
dojox.data.JsonRestStore should have a public method to clear its cache
Reported by: | Ed Chatelain | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Data | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When trying to reload a tree using a dojox.data.JsonRestStore?, the only way I have found to clear the cache in the JsonRestStore? requires the use a a private variable _index.
In this ticket http://bugs.dojotoolkit.org/ticket/11065 there is code that clears the cache as part of a reload function. The code below works, but a public method is needed to do this without having to use the private _index.
storeTarget = this.model.store.target; for (var idx in dojox.rpc.Rest._index) {
if (idx.match("" + storeTarget)) {
delete dojox.rpc.Rest._index[idx];
}
}
I will attach a zip with a test to show the problem, and a patch to add a clearCache function to JsonRestStore?.
Attached is a testcase with an html file and 2 .json files. To see the problem hit index.html and click the refresh button. The refreshed tree will have a duplicate zzz node. If the code in tree_refresh above is uncommented (or the clearCache fuction is added and called) the duplicate node problem will not occur.
Patch from Ed (IBM, CCLA).
Attachments (2)
Change History (4)
Changed 11 years ago by
Attachment: | 12968SimpleTest.zip added |
---|
Changed 11 years ago by
Attachment: | 12968JsonRestStore.patch added |
---|
the patch to add the clearCache function.
comment:1 Changed 11 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
comment:2 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.
test zip file