Problems with forcing cache entries
I wrote a small addon to add some inscription information to tooltips:
http://www.wowinterface.com/download...rindstone.html I have my association tables implemented via item IDs instead of names to provide cross-localization support automatically. However, by doing this I need to force all of the inscription-related items (herbs, pigments, and inks) from my tables into the user's cache so later calls to GetItemInfo() do not return nil. After doing some research, I found that the following will force an item into the cache: Code:
tooltip:SetHyperlink("item:" .. id) Is there some sort of delay on cache entries that would cause these first couple startup iterations to not find the items in the cache even though they had been set via GameTooltip:SetHyperlink()? Or if this isn't the case, is there a more effective way to force data into the cache for later use? |
Quote:
What I do for this problem in Lootvalue (which faces similar problems to your addon) is just to keep retrying every 200msec (via OnUpdate) while the tooltip is shown to see if we have the data yet. (I use 200msec since for most players that means one retry cycle, and 200msec is the Blizz default tooltip update delay anyway). Hope that helps -- Cirk |
All times are GMT -6. The time now is 12:38 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI