adds votes and votes cache to db