How to update/store entries into memcache from C++ FastCGI process?

Hello,

This is my first post here, so first and foremost, I would like to say I
have fallen in love with nginx. :slight_smile: This is the most beautiful server I
had ever seen before. Thank you so much for providing such a wonderful C
server. :slight_smile: I totally love it. :slight_smile:

Despite searching the internet (mainly github/stackoverflow/google ) for
it, I did not find any clue(s) as to how will I store the contents in
the memcache.

What I wanted to try out is something below:
At the start the FastCGI process (written using FastCGI++ using C++
course), I want to populate the memcache [either
NginxHttpMemcachedModule or NginxHttpMemcModule] with, say, 1000
thumbnails.

Please, can anyone here just point to me how can I do that? I know it
must be really easy but I have spent quite a lot of time trying to do
this.

PS: I did find example/article regarding this on Internet but that code
is in PHP.

Link:

I am mainly looking for equivalents of following two PHP calls in C/C++
on that link (please search on that page) :

  1. memcache_connect
  2. memcache_add

Thank you very much in advance and please pardon if this sounds like a
basic question.

Kind regards,
~Viren

Posted at Nginx Forum:

Hi,

On Thu, Jun 17, 2010 at 12:32:02AM -0400, drvirens wrote:

…

I am mainly looking for equivalents of following two PHP calls in C/C++
on that link (please search on that page) :

  1. memcache_connect
  2. memcache_add

libmemcache is a high-performance C interface for databases/memcached.
memcached is a distributed memory object caching system, generic in
nature, but intended for use in speeding up dynamic web applications
by alleviating database load.

http://people.freebsd.org/~seanc/libmemcache/

–
Sergey A. Osokin,
[email protected]
[email protected]

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. :frowning: Apologies for my
extremely poor knowledge in this area!!

Posted at Nginx Forum: