Lines 87-93
sub new {
Link Here
|
87 |
$self->{namespace} .= ":$subnamespace:"; |
87 |
$self->{namespace} .= ":$subnamespace:"; |
88 |
|
88 |
|
89 |
if ( $self->{'default_type'} eq 'memcached' |
89 |
if ( $self->{'default_type'} eq 'memcached' |
90 |
&& can_load( modules => { 'Cache::Memcached::Fast' => undef } ) |
90 |
&& can_load( modules => { 'Cache::Memcached::Fast::Safe' => undef } ) |
91 |
&& _initialize_memcached($self, @servers) |
91 |
&& _initialize_memcached($self, @servers) |
92 |
&& defined( $self->{'memcached_cache'} ) ) |
92 |
&& defined( $self->{'memcached_cache'} ) ) |
93 |
{ |
93 |
{ |
Lines 120-128
sub _initialize_memcached {
Link Here
|
120 |
. join( ', ', @servers ) |
120 |
. join( ', ', @servers ) |
121 |
. " with " |
121 |
. " with " |
122 |
. $self->{'namespace'}; |
122 |
. $self->{'namespace'}; |
123 |
# Cache::Memcached::Fast doesn't allow a default expire time to be set |
123 |
# Cache::Memcached::Fast::Safe doesn't allow a default expire time to be set |
124 |
# so we force it on setting. |
124 |
# so we force it on setting. |
125 |
my $memcached = Cache::Memcached::Fast->new( |
125 |
my $memcached = Cache::Memcached::Fast::Safe->new( |
126 |
{ |
126 |
{ |
127 |
servers => \@servers, |
127 |
servers => \@servers, |
128 |
compress_threshold => 10_000, |
128 |
compress_threshold => 10_000, |