Commit b0698dd1 authored by Keith Jolley's avatar Keith Jolley

Cache scheme warehouse indices.

parent 90886ea1
......@@ -376,8 +376,11 @@ sub get_scheme_locus_indices {
sub get_scheme_warehouse_locus_name {
my ( $self, $scheme_id, $locus ) = @_;
my $locus_indices = $self->get_scheme_locus_indices( $scheme_id, { pg_numbering => 1 } );
return "profile[$locus_indices->{$locus}]";
if ( !$self->{'cache'}->{'scheme_warehouse_locus_indices'}->{$scheme_id} ) {
$self->{'cache'}->{'scheme_warehouse_locus_indices'}->{$scheme_id} =
$self->get_scheme_locus_indices( $scheme_id, { pg_numbering => 1 } );
}
return "profile[$self->{'cache'}->{'scheme_warehouse_locus_indices'}->{$scheme_id}->{$locus}]";
}
#pk_value is optional and can be used to check if updating an existing profile matches another definition.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment