On Mon, Apr 30, 2007 at 09:20:45 -0700, Michael Higgins wrote:
> I'm afraid this doesn't mean anything to me yet. I'm caching like this:
>
> unless ( $result = $cache->get( 'clients' ) ) {
> $result = [$c->model('BanTraceDB::TBGClient')->search(
> {},{ order_by=>'name ASC'}
> )];
>
> $c->cache->set( 'clients', $result );
> }
>
> I don't know what's happening 'under the hood'.The problem is that e.g. $result->[0]->result_source is a very large data structure, containing the entire DBIC schema definition (every table involved in your DB is referenced in there). If you load the aforementioned component into BanTraceDB::TBGClient then the hook that Storable (what's used internally by most caching modules) will call to serialize the row objects will remove the reference to the result source and the schema, effectively saving only the actual row data, that you you would like to save, giving you both a performance boost and a cache size reduction. -- Yuval Kogman <[EMAIL PROTECTED]> http://nothingmuch.woobling.org 0xEBD27418
pgpX4snbjwIBZ.pgp
Description: PGP signature
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
