I agree with you, it was a workaround. The thing is that the issue is not really in our own code, but in a library that we depend on for charts.
I have now created another fix, that is a bit more clean. For all charts with cache names in them (assuming other charts not have the issue), we will cut off the name after a certain amount of characters, currently 35.
Now, there is no clear length that is ok and not ok. It depends on what kind of characters it is. I don't know if it's due to the characters width, or if they are multibyte. I assume their width, but from what I have seen, it almost seems to be multibyte related. Anyway. 35 worked on the page I tested, it might not work with others, then we will have to decrease it even more.
The downside is that all other operating system will now suffer for the windows issue. But hey, windows is probably used the most so.
Also, this issue could exist for someone with a very long profile name for example, or maybe in other charts. But I assume that isn't a real issue, and I haven't heard about it in those cases, yet.
I have just published the new fix/workaround. Feel free to test it, and come back to us if you think 35 needs to be decreased.