svn://svn.open-ils.org/ILS/trunk
........
r9654 | miker | 2008-05-21 12:37:30 -0400 (Wed, 21 May 2008) | 1 line
allow differentiation of orgtree cache keys; use this to cache per-locale trees
........
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9655
dcc99617-32d9-48b4-a31d-
7c20da2025e4
);
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;
}