[Freeswitch-users] new module: mod_memcache

Peter P GMX Prometheus001 at gmx.net
Thu Apr 2 06:08:25 PDT 2009


Wow, this is cool. Fantastic work!
I tried this immediately. This is also very useful to share data across
applications.

Here an example how to share data between Freeswitch and a ruby
memcache-client:
On Ruby/Rails I set the namespace e.g. to "freeswitch" for the same
memcached server in environment.rb
In Freeswitch I add the following line to the dialplan:
        <action application="set" data="ignore=${memcache(set
freeswitch:test 'This is a test')}"/> <!-- Memcache test -->
Take care to prefix your key (here "test") with the Ruby namespace
"freeswitch:"

Now you can receive the data in Ruby in raw mode:
>> CACHE.get("test",0)
=> 'This is a test"

The 0 as second parameter is important for the raw mode, otherwise ruby
will try to marshall the result from memcached and fails.

I added this info to the wiki.

Best regards
Peter


Brian West schrieb:
> At the very least you didn't say "I can't wait to play with it!"  :P
>
>
> On Apr 1, 2009, at 7:59 PM, Shelby Ramsey wrote:
>
>> Rupa,
>>
>> This is a big contribution!  Thanks!  Can't wait to play with this.
>>
>> SDR
>
> Brian West
> brian at freeswitch.org <mailto:brian at freeswitch.org>
>
> -- Meet us a ClueCon!  http://www.cluecon.com <http://www.cluecon.com/>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>   




More information about the FreeSWITCH-users mailing list