Neid has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I have problem with clients memcached library incapabilities.
I have read http://code.google.com/p/memcached/wiki/FAQ, but I need
to find a solution for that.

Php and perl clients use the same memcached.
Php is using standard memcached client http://www.php.net/manual/en/book.memcache.php

For perl I have tried:
1. Cache::Memcached, but it's totally incompatible with php client. I can't read the same
key from php, even when there is only one mecached server.

2. Memcached::libmemcached - when there is only one memcached server, everything
works smooth, the problem arise when I add more memcached servers.
Then diffrent keys end up on diffrent servers.

The question is:
Do you know any compatibile set of perl<->php clients ?

Replies are listed 'Best First'.
Re: memcached, php and perl
by hsinclai (Deacon) on Feb 11, 2009 at 23:43 UTC

    Does it not say to standardize on a single format like JSON or XML to ensure access from different clients?

    As far as Memcached::libmemcached, doesn't this address the multiple servers issue?

    Hopefully I'm understanding your question correctly.... I hope...

Re: memcached, php and perl
by sftranna (Initiate) on Dec 04, 2013 at 18:57 UTC
    I am not sure If get understand you properl but still if you need memcache(d) to work you need to have php 5.2 or above and In perl On can get the cache values like
    my $serviceID=$ARGV[0]; my $perlKey=’perl_’.$serviceID; my $result = $memcli->get($perlKey);
    and to set memcache you can use
    $perlString = $val1.’,’. $val2.’,’. $val3.’,’. $val4.’,’. $val5.’,’. $ +val6; $memcache->set($perlKey, $perlString, 0, 10);
    - See more at: http://ecarobar.com/memcached-using-php-and-perl/#sthash.LkEfL9gv.dpuf