Simplified code, and support dynamic message cache total count by configuration. :sunglasses:

Configuration fixed in index.js.