Changeset 383 for trunk

Show
Ignore:
Timestamp:
06/21/07 22:40:54 (3 years ago)
Author:
ykerherve
Message:

here we go, this is what I wanted to check in as r381

Partly reverting Garth's change about remove:
for remove, it's probably safer to remove from the cache first

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/Data/ObjectDriver/Driver/BaseCache.pm

    r382 r383  
    198198        Carp::croak("nofetch option isn't compatible with a cache driver"); 
    199199    } 
    200  
    201     my $ret = $driver->fallback->remove(@_); 
    202200    if (ref $obj) { 
    203         $driver->remove_from_cache($driver->cache_key(ref($obj), 
    204                                    $obj->primary_key)); 
    205     } 
    206  
    207     return $ret; 
     201        $driver->remove_from_cache($driver->cache_key(ref($obj), $obj->primary_key)); 
     202    } 
     203    $driver->fallback->remove(@_); 
    208204} 
    209205