It dosen not need to. In Perl you build a refernce withe
  informaiton as required and then you serialize it with JSON
  and store in the database.

  IT looks to me that your approach is based on a missuderstanding
  of the capabilties of mongodb.
ok It is possible that i am wrong as i am new to mongodb but can you please see the output of you clear idea of cache.
$./bin/test
it will give 
--
Rishabh Sharma
Software Developer
Anantya R&D
http://www.anantyarnd.in