Welcome! Log In Create A New Profile

Advanced

Re: How can I keep a large list in apache memory

Markus Jelsma
March 09, 2010 07:40AM
Storing data in memcache can be done from almost any language available. You
need to run a memcached server [1] somewhere and connect to it from some
program. Then you can simply set key/value pairs.

A PHP example:
$m = new Memcache('host');
$m->set('key', 'value');

If you set all your user/IP pairs in the cache, you can then retrieve them in
your Nginx config. Make sure you have the memc module compiled in. It would
also be a good idea to compile the eval module; with it, you can store the
value in a variable.

Then, using that value (the IP address), you can select your backend.

[1]: http://memcached.org/

On Tuesday 09 March 2010 13:19:04 ramprasad_ap wrote:
> Can you give me an example how to store an array in memcache
>
> I am quiet new to ngnix , Do I require any extramodules or is memcache
> always a part of nignx
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,61798,61812#msg-61812
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

Markus Jelsma - Technisch Architect - Buyways BV
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

How can I keep a large list in apache memory

ramprasad_ap March 09, 2010 06:12AM

Re: How can I keep a large list in apache memory

Markus Jelsma March 09, 2010 06:42AM

Re: How can I keep a large list in apache memory

ramprasad_ap March 09, 2010 07:19AM

Re: How can I keep a large list in apache memory

Markus Jelsma March 09, 2010 07:40AM

Re: How can I keep a large list in apache memory

James Matthews March 09, 2010 03:12PM

Re: How can I keep a large list in apache memory

Guillaume Filion March 09, 2010 04:28PM

Re: How can I keep a large list in apache memory

Cliff Wells March 09, 2010 04:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready