detailsRequestsSent doesn’t seem useful as there is already a detailsCache
-
Greetings,
Not sure, but while looking a the source I’ve found something troubling.
I don’t understand the necessity of those lines (823-828 of jquery-dgwt-wcas.js) :
// Prevent duplicate ajax requests
if ( $.inArray( cacheKey, that.detailsRequestsSent ) != -1 ) {
return;
} else {
that.detailsRequestsSent.push( cacheKey );
}The thing is that we already have a detailsCache I don’t see the need to store already called request as both are linked (if in cache then request was already sent). Furthermore, both are not synced. cachedDetails is emptied in clearCache, detailsRequestsSent is not. Then we could have a request already stored as sent when corresponding cache is empty.
As I’ve said I am not sure why this check is needed. It seems to me that the cache is sufficient here. But I could totally be wrong.
Great work by the way !
- The topic ‘detailsRequestsSent doesn’t seem useful as there is already a detailsCache’ is closed to new replies.