I could also imagine allowing for a more direct approach in the case of .invalidateCache, that would allow users to simply refer to the folder and invalidate any caching that may be involved. Something like this:
MyFolder.invalidateCache() which would take care of this behavior automatically.
For the case of clearing any query caches and folder targeting, I can definitely see the usefulness of being able to reference all queries in a folder and have the code behind the scenes iterate through each of them regardless of any name changes.
Let me make a feature request for that right now!
Looking at the first post, I was about to write out a long response as to how Javascript is single threaded, and race conditions but I am sure you already know all of that fun stuff