Changeset 1414

Show
Ignore:
Timestamp:
02/27/08 00:36:15 (5 months ago)
Author:
bchoate
Message:

Use capability test to invoke disconnect_all on memcached class.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-30/lib/MT/Memcached.pm

    r1197 r1414  
    4242sub cleanup { 
    4343    undef $Instance; 
    44     Cache::Memcached->disconnect_all 
    45         if MT->config->MemcachedDriver eq 'Cache::Memcached'; 
     44    my $driver_class = MT->config->MemcachedDriver; 
     45    if ($driver_class->can('disconnect_all')) { 
     46        $driver_class->disconnect_all; 
     47    } 
    4648} 
    4749