-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong behavior when call Reload on PersonalCacheStruct #24
Comments
How about this link Jesse1205/ScutGame@8cc4ab9 |
this problem will happen when the entity have more than two key..
here is my solution SqlDataReceiver.cs
|
@Jesse1205 Can you describe the problem that apply your solution? i test original TryGetCacheItem. and its lazy anonymous delegate never executed. |
if you call reload function on PersonalCacheStruct especially entity has ReadWriteDB property
it will re-load data from Database.
and it set value by ReadEntityProperty method in SqlDataReceiver.cs
it call entity's Property function and it fire event NotifyChange event and the value will be added to SyncQueueManager. clearly not expected behavior.
moreover the "ReadEntityProperty" function set value sequencely
each set value fire event and the "not completed setting entity' will be added;
in another word.
if you have some entity like below
and we have one data from database as below
UserID, subKey
1, 2
now call
PersonalCacheStruct().Reload();
then we will have two DataSyncQueue item
1-0, 1-2
we don't need add this data to DataSyncQueue again. just waste performance
The text was updated successfully, but these errors were encountered: