Hi there,
In the UserProvider (and possibly others) I see this:
if (isReadFromSourceFinished)
{
Writer.FinishWriting();
sqlTransaction = Connection.BeginTransaction();
Writer.MoveDataToMainTables(sqlTransaction);
Writer.DeleteExcessFromMainTable(sqlTransaction);
sqlTransaction.Commit();
Writer.SendUserPasswords();
//Clear group cache for refreshing users in the groups they were imported
Group.ClearCache();
//Frontend.Reset.ResetHash(Frontend.Reset.HashType.Area);
Ecommerce.Common.Application.KillAll();
UpdateIndex(job);
}
This clears a lot of cached data every time the job runs. It does that regardless of whether there were any records affected or not. On some of our sites, we run this job very frequently: every 15 minutes or so to pull in new users from an ERP. For some customers, we run this multiple times against different ERPs which means we may run this every 5 minutes.
If I am reading the code right, we're blowing away tons of Ecommerce data away every time this job runs.
That doesn't feel right to me ;-) Should the providers be a little more selective about what they clear, and at the very least try not to kill the cache when no records were imported (i.e. the source file was empty)?
Thanks!
Imar