[Jifty-commit] r832 - in Jifty-DBI/trunk: lib/Jifty/DBI/Record
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Apr 10 23:12:38 EDT 2006
Author: jesse
Date: Mon Apr 10 23:12:38 2006
New Revision: 832
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Record/Cachable.pm
Log:
r11509 at hualien: jesse | 2006-04-10 23:12:06 -0400
* records with a zero id weren't being properly cached
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record/Cachable.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record/Cachable.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record/Cachable.pm Mon Apr 10 23:12:38 2006
@@ -114,13 +114,12 @@
sub load_by_cols {
my ( $self, %attr ) = @_;
-
## Generate the cache key
my $alt_key = $self->_gen_alternate_record_cache_key(%attr);
if ( $self->_fetch( $self->_lookup_primary_record_cache_key($alt_key) ) ) {
return ( 1, "Fetched from cache" );
}
-
+ #warn "Didn't get it from the cache";
# Blow away the primary cache key since we're loading.
$self->{'_jifty_cache_pkey'} = undef;
@@ -264,7 +263,7 @@
sub _primary_record_cache_key {
my ($self) = @_;
- return undef unless ( $self->id );
+ return unless ( defined $self->id );
unless ( $self->{'_jifty_cache_pkey'} ) {
More information about the Jifty-commit
mailing list