Thank you Sergey for your reply. Also, thanks for the link for the libmemcache.
But I wanted to know how can I access the NginxHttpMemcachedModule or NginxHttpMemcModule cache (to add entries into it) from a fastCGI process? Or, are you trying to indicate that both of the above modules use libmemcache ? I am kind of confused here. :( Apologies for my extremely poor knowledge in this area!!