Page 1 of 1

Caching tables with ED with dotConnect for SalesForce

Posted: Tue 05 Feb 2013 12:14
by craigd
If a particular table's cache hasn't been updated for some time, or if there has been some form of maintenance that bulk updates a lot of records, this causes an error when accessing the entity (exception is raised saying that the retrieve() limit has been reached).

My guess is that the data replication api is being used under the covers.

The normal way this is done using the SOAP API would be to make multiple queries to the retrieve() function, but it looks like this check is not being done.

The only solution once this happens is to delete the DataCache SQLite database and start caching again.

This is very hard to catch and fix automatically though, and really affects performance.

It would be better if the cache update routine just cycled through in chunks no greater than the hard limit imposed by the provider.

Thanks...
Craig

Re: Caching tables with ED with dotConnect for SalesForce

Posted: Thu 07 Feb 2013 10:26
by Shalex
craigd wrote:if there has been some form of maintenance that bulk updates a lot of records, this causes an error when accessing the entity (exception is raised saying that the retrieve() limit has been reached).
We are investigating the way to take into account the retrieve() limit when smart refresh is used.
craigd wrote:The only solution once this happens is to delete the DataCache SQLite database and start caching again.
As a workaround, please set caching with a full refresh method (fullRefresh=true) for your table using, for example, this overload of the mySalesforceConnection.Cache.Create method: http://www.devart.com/dotconnect/salesf ... an%29.html.

Re: Caching tables with ED with dotConnect for SalesForce

Posted: Thu 07 Feb 2013 13:31
by craigd
Thanks for the heads up. The full refresh method is a significant overhead under normal situations, so instead I think it would be preferable to catch the exception if it happens, and only then do a full refresh on the table that is affected. There's a good chance that it is only one of a small number of tables that will happen with, so hopefully this will work.

I'd appreciate an update if/when this is fixed.

Re: Caching tables with ED with dotConnect for SalesForce

Posted: Mon 11 Feb 2013 08:49
by Shalex
We will post here about the results of our investigation.