http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13431
--- Comment #18 from Jacek Ablewicz <[email protected]> --- (In reply to Chris Cormack from comment #16) > > +use C4::Context; > > We can't do this. We just added a big circular dependency if we do. > > Because C4::Context uses Koha::Cache Not in the current master (?), but it indeed will be used after bug 11998 (I was under the impression that bug got already pushed). But it looks like this line is not even necessary: in all places where Koha::Cache is used so far, C4::Context is already loaded. Making such assumption is probably not very good practice, but this code part (which includes database name etc. in the sharefile name) is intended only as temporary (= until namespace configuration issue gets dealt with properly) solution for severely misconfigured multi-instance setups. So maybe we can live with that ;) if some extra precautions will be taken (like putting that code part in the eval {} block + some warn "Unable to determine database name due to .." maybe ?). > @@ +162,5 @@ > > sub _initialize_fastmmap { > > my ($self) = @_; > > + my $share_file = join( '-', > > + "/tmp/sharefile-koha", $self->{'namespace'}, > > + C4::Context->config('hostname'), C4::Context->config('database'), > > A better way to do this is is to change the places that call > Koha::Cache->new() > To set the namespace. > > EG my $cache = Koha::Cache-new({cache_type => 'memcached_cache', namespace > => C4::Context->config('hostname') . '-' .C4::Context->config('database')}); That would make Koha::Cache usage a bit inconvenient IMO, especially as Koha::Cache->new() is currently never called outside of Koha::Cache itself, Koha::Cache->get_instance() is always used instead. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
