This only happens for 4 keys: Left, Right, Backspace, and Delete. The first 2 are "navigation" keys and the other 2 are for deleting, so this doesn't fall into the "typing" category (which is more performance critical).

I'm hesitant to cache this preference value, because there others in this same function ("indentWithTabs", "indentUnit") that could also be cached. Unless you can notice a difference on your machine (that "isn't that fast"), I think this is ok.