Menu

#1 In-memory cache for object references

open
nobody
5
2003-02-27
2003-02-27
No

Here's an example (from David Hugh-Jones):

my $test = My::Obj->fetch(1);
my $test2 = My::Obj->fetch(1);
$test2->{field} = 11;

# somewhere else ...

$test->{field} = 22;
$test->save;

# now we are out of sync

print $test->{field};
print $test2->{field};

Implement in-memory caching so that $test2 and $test
are actually the same object/reference.

Discussion


Log in to post a comment.