Get Version is the first function is called?

Today, I am debug an issue, when user opan the About dialog, some function will disappear from the UI.

It’s very strange, because About dialog should has no relate with other functions.

After debug from UI and Backend side, and add some log, and find the reason.

Because the UI save some cache in backend, and the original developer want to clear the cache when user login or refresh the UI, so they think that get version is the first function is called.

But this is true?

In the About dialog, it also show the version, and this dialog can open at anytime.

Sometimes, we always think that our thinking is true, but sometimes it might not true.

When we add some codes, we need to think it carefully!

原文地址:https://www.cnblogs.com/liwp_Stephen/p/3522999.html