Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I have Cache::Memcache installed on Redhat. I have started the memcache process like so:

memcached -d -m1024 -l -p 11211 -u root

Apache is configured like so:

PerlModule My::SSI <Files ~ "\.(s?html|xml)$"> RequestHeader unset If-Modified-Since RequestHeader unset If-None-Match ExpiresActive On ExpiresDefault "access plus 5 minutes" PerlOptions +SetupEnv PerlOutputFilterHandler My::SSI </Files>

In My::SSI I create various other objects and call methods on them. E.G. My::MemcacheTest->test

package My::MemcacheTest; # ... etc ... - let me know if this bit is important! sub test { my $memd = Cache::Memcached->new( servers => [ "" ], debug => 0, compress_threshold => 10_000, ); $memd->set('my_test','KISS'); my $simple_test = $memd->get('my_test') || 'This did not work'; print STDERR "Test Result = $simple_test\n"; }
#Outputs: 'Test Result = This did not work'

Elsewhere I have a simple script to read the memcached key, which works:

#!/usr/bun/perl use Cache::Memcached; my $memd = Cache::Memcached->new( servers => [ "" ], debug => 0, compress_threshold => 10_000, ); print "Memcached value is: ".$memd->get('my_test')." \n";
#Outputs: Memcache value is: KISS

I have tried various combinations of getting and setting values, the only one that doesn't work is 'get' through mod_perl

-=( Graq )=-

In reply to Memcache 'get' returns undef running under mod_perl by graq

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2023-12-02 04:45 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (13 votes). Check out past polls.