Thanks for the suggestion, but what's worse is that I'm caching Rose::DB::Object,not Rose::DB.

same difference

http://search.cpan.org/grep?cpanid=JSIRACUSA&release=Rose-DB-Object-0.797&string=storable&i=1&n=1&C=0

http://cpansearch.perl.org/src/JSIRACUSA/Rose-DB-Object-0.797/t/db-object-helpers.t

my $o = $class->new(id => 1)->load_or_save; my $frozen = Storable::freeze($o->strip(strip_on_save_ok => 1)); my $thawed = Storable::thaw($frozen);

 

And there seems no simple way to extract the hash it contains.

http://cpansearch.perl.org/src/JSIRACUSA/Rose-DB-Object-0.797/lib/Rose/DB/Object/Cached.pm

sub remember { my($self) = shift; my $class = ref $self; my $meta = $self->meta; my $pk = join(PK_SEP, grep { defined } map { $self->$_() } $meta->pr +imary_key_column_accessor_names); no strict 'refs'; my $ttl_secs = $class->meta->cached_objects_expire_in || 0; my $loaded = $ttl_secs ? time : 0; ${"${class}::Objects_By_Id"}{$pk} = $self; if($ttl_secs) { ${"${class}::Objects_By_Id_Loaded"}{$pk} = $loaded; } my $accessor = $meta->column_accessor_method_names_hash; foreach my $cols ($self->meta->unique_keys_column_names) { no warnings; my $key_name = join(UK_SEP, @$cols); my $key_value = join(UK_SEP, grep { defined($_) ? $_ : UNDEF } map { my $m = $accessor->{$_}; $self->$m() } +@$cols); ${"${class}::Objects_By_Key"}{$key_name}{$key_value} = $self; ${"${class}::Objects_Keys"}{$pk}{$key_name} = $key_value; if($ttl_secs) { ${"${class}::Objects_By_Key_Loaded"}{$key_name}{$key_value} = $l +oaded; } } };

In reply to Re^8: How do I save a Rose::DB::Object instance to Cache::Memcached::Fast and retrieve it? by Anonymous Monk
in thread How do I save a Rose::DB::Object instance to Cache::Memcached::Fast and retrieve it? by PerlOnTheWay

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.