Has someone suggested whiteboard proficiency is sufficient by itself?
The whiteboard is meant to filter out people who suck. "Add a cache to a JavaScript function" is a dumb question for reasons many others have pointed out. Joel's classic article[1] recommends these as examples:
• Write a function that determines if a string starts with an upper-case letter A-Z
• Write a function that determines the area of a circle given the radius
• Add up all the values in an array
Those are all trivial. You should be able to come up with another half-dozen if you sit and think for a bit. The language doesn't matter, and the syntax shouldn't matter (as compared to the semantics).
I hear lots of scare-stories of "great coders who choke on interviews," but I find it very hard to believe any kind of "great coder" can't add up the values in an array. I might ask "how do you find the median value in the array" just to see what they come up with. There isn't a right answer, but there are lots wrong answers.
[1] http://www.joelonsoftware.com/articles/GuerrillaInterviewing...