);
sub get_org_tree {
- my( $self, $client) = @_;
- return $U->get_org_tree();
+ my $self = shift;
+ my $client = shift;
+ return $U->get_org_tree($client->session->session_locale);
}
}
sub get_org_tree {
+ my $cache_diff = shift || '';
my $cache = OpenSRF::Utils::Cache->new("global", 0);
- my $tree = $cache->get_cache('orgtree');
+ my $tree = $cache->get_cache("orgtree.$cache_diff");
return $tree if $tree;
$tree = OpenILS::Utils::CStoreEditor->new->search_actor_org_unit(
]
)->[0];
- $cache->put_cache('orgtree', $tree);
+ $cache->put_cache("orgtree.$cache_diff", $tree);
return $tree;
}