Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Cache on the sheet worker?

My Character Sheet keeps creating values for input fields that are not existent any longer. My sheet is used on game:  3889817 It's been 7 months since I worked on it for the last time. Now i implemented a few changes but the sheet denies them and keeps using stuff that is gone... meh? I had this code first: <input type="text" name="attr_str-statusmod" value="0" readonly="readonly"> on("change:bullenstaerke", function() { getAttrs(["str-statusmod", "bullenstaerke"], function(values) { setAttrs({ "str-statusmod": parseInt(values["bullenstaerke"]*4,10) }); }); }); It worked perfectly for the last 4 months! Now I wanted to add another field to the calculation to sum up all the str buffs... whatever. I played around a bit and found out that my changes to the sheet are actually being ignored. Now I have the following code: <input type="text" name="attr_diesisteintest" value="0" readonly="readonly"> on("change:bullenstaerke", function() { getAttrs(["diesisteintest", "bullenstaerke"], function(values) { setAttrs({ "diesisteintest": parseInt(values["bullenstaerke"]*4,10) }); }); }); But my sheet keeps creating "str-statusmod" in the "Attributes & Abilities" Tab. That field is not being used anywhere anymore! And also the calculation that adds it up to the whole amount of Strength is GONE. How is that even possible?  What can I do to force a refresh on the script? The DOM of my HTML is just fine. It refreshs. The JavaScript isn't though.
For reference: I use macros to change the value:  attributeObjArray[0].setWithWorker("current", newValue);
So - I tested the whole thing from out of the office today. And here the JavaScript is obviously correct. It returns the correct value and it creates the correct field in "Attributes & Abilities". Seems like it's really a caching issue. Maybe you are delivering old / cached generated JavaScript content... ?
For everyone else having trouble with the cache as well: Just save a random API script and BOOM. The cache is refreshed and suddenly everything works fine again.
Hey Arthega, Just checking in - does everything seem to be working fine now? Did anything else pop up? 
You are free to close the ticket now. :) Thanks for the reminder.
Hi&nbsp;Arthega, Glad to hear it's working! Just wanted to make sure you got taken care of :)&nbsp; I'll go ahead and close this thread, but if anything else comes up, please don't hesitate to reach out to us again by creating a new post or sending us an email to <a href="mailto:Team@Roll20.net" rel="nofollow">Team@Roll20.net</a>. Thank you!