Added a reference cache into the Mongo model

Also fixed a bug (missing parenthesis)