Add a cli flag for setting a max size of message cache