'scan the cache for the object. If found return it.
'Also if the current object is a proxy object we must load it. We cannot look in the cache.
If useCache And m_useCache And Not obj.IsProxy Then
If useFind Then
tmpObj = m_cache.Find(obj)
Else
tmpObj = m_cache.Item(obj)
End If
End If
always retrive my object, because my obj.isproxy alwas is true.
If I do obj.isProxy=false before of execute obj.find, this change of cache or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Turning off the proxy flag should force the cache to be read.
From your other post I think I understand what you are seeing.
1. When you do a retrieve criteria you get a cursor back with all the objects that can be loaded. By default these will all be proxy objects.
2. Each time you iterate through the cursor and do a loadobject() because the object is a proxy it forces a read from the database - even though the object may already be in the cache.
I'll have a look at and see if I can improve it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In your code:
'scan the cache for the object. If found return it.
'Also if the current object is a proxy object we must load it. We cannot look in the cache.
If useCache And m_useCache And Not obj.IsProxy Then
If useFind Then
tmpObj = m_cache.Find(obj)
Else
tmpObj = m_cache.Item(obj)
End If
End If
always retrive my object, because my obj.isproxy alwas is true.
If I do obj.isProxy=false before of execute obj.find, this change of cache or not.
Turning off the proxy flag should force the cache to be read.
From your other post I think I understand what you are seeing.
1. When you do a retrieve criteria you get a cursor back with all the objects that can be loaded. By default these will all be proxy objects.
2. Each time you iterate through the cursor and do a loadobject() because the object is a proxy it forces a read from the database - even though the object may already be in the cache.
I'll have a look at and see if I can improve it.