in reply to Memcache 'get' returns undef running under mod_perl

debug => 0,

That seems the obvious place to start. :)

- tye        

Replies are listed 'Best First'.
Re^2: Memcache 'get' returns undef running under mod_perl (debug)
by graq (Curate) on Nov 30, 2007 at 16:59 UTC

    Sadly, it does not seem very informative. Telling me that the value has been stored (which I know) and that the cache has been hit (which I know).

    Other than that, it is very silent

    -=( Graq )=-

      To continue with the simple and obvious suggestions (that you may have already tried), add "-vv" to your memcached command line. (I was also suspicious of your "-u root" as hsinclai highlighted but it'd also be interesting to learn of the mechanics of the failure.)

      - tye        

        The problem lay in the FilterHandler's invocation of other classes.

        The code looked a little like this

        $html =~ s/<\?KEYWORD\s+([^\?^>]+)\??>/$self->handle($1)/gme;

        Changing this to

        $html =~ s/<\?KEYWORD\s+([^\?^>]+)\??>/$self->handle($1)/ge; # Removed multiline option 'm'

        fixed the memcache problem.

        It seems to alter memcache's behaviour in GetParser when checking $self->[BUF]

        if ($self->[BUF] =~ /^END\r\n/) { $self->[ON_ITEM] = undef; return 1; # we're done successfully, return 1 to finish }

        Looks like m fighting with S*

        -=( Graq )=-