diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-01-28 16:23:40 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-01-28 16:23:40 -0800 |
commit | 5f7ce7b22d70058613be046ee67778d6d9969fd9 (patch) | |
tree | c56bdaaff0f200e329d2e99825564393d8e5aedd /FS/FS/cust_pkg.pm | |
parent | bbc082b0295335839b6e52ebc46941905165f202 (diff) |
optimize Reports->Customers->List Customers, RT#20173
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r-- | FS/FS/cust_pkg.pm | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index c507a45..6dcd740 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -56,18 +56,25 @@ our ($disable_agentcheck, $DEBUG, $me, $import) = (0, 0, '[FS::cust_pkg]', 0); our $upgrade = 0; #go away after setup+start dates cleaned up for old customers -sub _cache { - my $self = shift; - my ( $hashref, $cache ) = @_; - #if ( $hashref->{'pkgpart'} ) { +sub _simplecache { + my( $self, $hashref ) = @_; if ( $hashref->{'pkg'} ) { - # #@{ $self->{'_pkgnum'} } = (); - # my $subcache = $cache->subcache('pkgpart', 'part_pkg'); - # $self->{'_pkgpart'} = $subcache; - # #push @{ $self->{'_pkgnum'} }, - # FS::part_pkg->new_or_cached($hashref, $subcache); $self->{'_pkgpart'} = FS::part_pkg->new($hashref); } +} + +sub _cache { + my $self = shift; + my ( $hashref, $cache ) = @_; +# #if ( $hashref->{'pkgpart'} ) { +# if ( $hashref->{'pkg'} ) { +# # #@{ $self->{'_pkgnum'} } = (); +# # my $subcache = $cache->subcache('pkgpart', 'part_pkg'); +# # $self->{'_pkgpart'} = $subcache; +# # #push @{ $self->{'_pkgnum'} }, +# # FS::part_pkg->new_or_cached($hashref, $subcache); +# $self->{'_pkgpart'} = FS::part_pkg->new($hashref); +# } if ( exists $hashref->{'svcnum'} ) { #@{ $self->{'_pkgnum'} } = (); my $subcache = $cache->subcache('svcnum', 'cust_svc', $hashref->{pkgnum}); |