Opened 9 years ago

Closed 7 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)

12968SimpleTest.zip (2.2 KB) - added by Ed Chatelain 9 years ago.
test zip file
12968JsonRestStore.patch (631 bytes) - added by Ed Chatelain 9 years ago.
the patch to add the clearCache function.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by Ed Chatelain

Attachment: 12968SimpleTest.zip added

test zip file

Changed 9 years ago by Ed Chatelain

Attachment: 12968JsonRestStore.patch added

the patch to add the clearCache function.

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 7 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.