# Memcache module implementation with multi-get support?

**URL:** <https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650>\
**Category:** NGINX\
**Created:** [April 6, 2012, 10:27pm UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650 "2012-04-06T22:27:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 6, 2012, 10:27pm UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650/1 "2012-04-06T22:27:17Z")

</div>

Hi,

Is there a memcache module implementation with multi-get support?

Thanks,  
Ashish

---

<div class="post-metadata">

**Author:** ![ashishsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@ashishsdev](https://www.ruby-forum.com/u/ashishsdev)\
**Post date:** [April 6, 2012, 11:40pm UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650/2 "2012-04-06T23:40:59Z")

</div>

On Apr 6, 2012, at 4:27 PM, Ashish S Dev wrote:

> Is there a memcache module implementation with multi-get support?

Probably be pretty simple to add it to

> **[GitHub - openresty/lua-resty-memcached: Lua memcached client driver for the ngx\_lua based...](https://github.com/openresty/lua-resty-memcached)**
>
> Lua memcached client driver for the ngx\_lua based on the cosocket API

---

<div class="post-metadata">

**Author:** ![ashishsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@ashishsdev](https://www.ruby-forum.com/u/ashishsdev)\
**Post date:** [April 7, 2012, 12:01am UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650/3 "2012-04-07T00:01:22Z")

</div>

On Fri, Apr 6, 2012 at 2:40 PM, Brian A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Apr 6, 2012, at 4:27 PM, Ashish S Dev wrote:
> 
> > Is there a memcache module implementation with multi-get support?
> 
> Probably be pretty simple to add it to  
> [GitHub - openresty/lua-resty-memcached: Lua memcached client driver for the ngx\_lua based on the cosocket API · GitHub](https://github.com/agentzh/lua-resty-memcached)

I think it already supports it if you pass an array of keys to the  
memc:get() function

Matt

---

<div class="post-metadata">

**Author:** ![ashishsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@ashishsdev](https://www.ruby-forum.com/u/ashishsdev)\
**Post date:** [April 7, 2012, 2:42am UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650/4 "2012-04-07T02:42:53Z")

</div>

On Sat, Apr 7, 2012 at 6:00 AM, Matthieu T.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> memc:get() function

Yes, it does.

Below is a test case for this feature:

> <https://github.com/openresty/lua-resty-memcached/blob/master/t/sanity.t#L1413>

The lua-resty-memcached library is not an nginx module itself, but  
rather a (nonblocking) Lua library that is intended to be used with  
the ngx\_lua module 🙂

Best regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![ashishsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@ashishsdev](https://www.ruby-forum.com/u/ashishsdev)\
**Post date:** [April 10, 2012, 3:44am UTC](https://www.ruby-forum.com/t/memcache-module-implementation-with-multi-get-support/218650/5 "2012-04-10T03:44:38Z")

</div>

Thanks, everyone. This works.

–Ashish
