« Return to Thread: Restful server does not check 'cached' items for query

Restful server does not check 'cached' items for query

by V S P :: Rate this Message:

Reply to Author | View in Thread

Using the trunk version of dojo

I am having the following problem (and this is most likely due to my not
knowing
rather than any real bug)

I defined Restful store, attached to the grid.

Loaded the grid with data.  

Now I need to search the store for an row with property that I know
has been loaded into memory.

So I expect that store will not issue a query to server and instead look
it up in its cache...
But I see that it issues the server query no mater what I try

----------

       
        var foundID=null;
       
        var srvc_def_id=dijit.byId("ID_srvc_def_id").attr("value");

console.log("srvc def id to search by is: ",srvc_def_id);      
        crmServicesStore.fetch(
                {
                        query: {"srvc_def_id":srvc_def_id},
                        queryOptions:{cache:true},
                        onItem: function (item,request)
                                        {
                                                console.log("found for update ",item);
                                                foundID=crmServicesStore.getIdentity(item);
                                        }
                });
       

        console.log("id to update ", foundID);
---------


therefore wanted to ask if I need to be subclassing the store
and defining my own 'client' filters to get caching to work?


thank you

--
Vlad P
author of C++  ORM  http://github.com/vladp/CppOrm/tree/master


--
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: Restful server does not check 'cached' items for query