Whaleshares Logo

Cached data can be confusing

ijmmaiwitnessPosted for Friends to comment on, 4 years ago3 min read

image.png

From time to time the following "errors" are reported to me

  1. Last night when I logged out of my account, my DaBa was at 80%. Nothing happened at night, but now it is down to 50%. Did someone use my account? Or is this a bug?

  2. I claimed my Daily Reward to my Tip Balance, but not all of the WLS ended up there. Is this a bug?

Neither one is an error, or a bug. This is all due to cached data.

Cached Data

To speed things up, and to prevent an overload of information requests to the blockchain, some of the data that is used to display the different pages on the platform, is cached. This means it is retrieved from the blockchain once, and used until there is a need for it to update. Both your DaBa resource and your Tip Balance are cached.

How does that work?

You log in, your data is retrieved, when you look at your "Status" page you see let's say 100% DaBa and 12.67 WLS Tip Balance.

Some people left replies, you reply to them and tip them, some people you follow published a post, you read it, leave a reply and tip them.

After being active for half an hour you return to your "Status" page, coz you remember you still have a Daily Reward to claim. At that point your "Status" page will still show the same data as before. These were not updated while you were working your way through replies, posts and tips.

So, despite using DaBa, it will still show 100% available. Despite tipping people here and there, your Tip Balance will still show you have 12.67 WLS to use.

Now, when you claim your Daily Reward, new data will be retrieved from the blockchain and numbers will be updated. Where you expect to see your Tip Balance to increase with the amount of your Daily Reward, you see the total of
12.67 - tips + Daily Reward
which will be lower than the
12.67 + Daily Reward
you expected.

At this point your available DaBa will also be updated. Let's say it went down to 67%. You decide to post something yourself, you check for new users and leave a comment on their first post and do a lot of other stuff. Actually you use almost all of your DaBa. After that you check your "Status" page again. Daba shows 67% , it hasn't updated to the new value, it is using the cached information. You log out.

Next morning you log in, check the "Status" page. DaBa is 53%!?
You feel like it decreased while it actually already increased a bit as DaBa regenerates over time.

Update the data manually

It is simple to update the page to show current values
Press Ctrl + R
or Shift + Ctrl + R
or Ctrl F5
(change Ctrl for Cmd in case you are on a Mac)


Image source


Use your witness votes wisely

Jump over to the Block Producer / Witness page and cast your witness votes. Simply click on the (^) up arrow next to the witness names of your choice (consider voting for "krazywitness" and "ijmmaiwitness") and supply your private active key to lock in your vote. Refresh the page in case your vote doesn't seem to stick.

Sign Up to join this conversation, or to start a topic of your own.
Your opinion is celebrated and welcomed, not banned or censored!