add commit cache (feature #622)

I don't see why setNodes has to correspond to the function committing nodes to the DB naming-wise. In programming, I think you should always try to find the most meaningful and accurate names for functions, no matter what the context.