[Koha-bugs] [Bug 14522] Use Koha::Cache for accessing single_holidays()

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 28 16:49:49 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14522

--- Comment #25 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 42919
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42919
[PASSED QA] Bug 14522 - Use Koha::Cache for accessing single_holidays()

Review of attachment 42919:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14522&attachment=42919)
-----------------------------------------------------------------

It seems we were here at the same time :)

I have also tried to reproduce the time reduction, without success.
A script I have used is coming...

::: Koha/Calendar.pm
@@ +94,5 @@
>      my $branchcode = $self->{branchcode};
> +    my $cache           = Koha::Cache->get_instance();
> +    my $single_holidays = $cache->get_from_cache('single_holidays');
> +
> +=c

Should be a simple comment, no need to put it in the pod.

@@ +395,5 @@
> +    $single_holidays->{'MPL'} = [$ymd];
> +    $cache->set_in_cache( 'single_holidays', $single_holidays, 76800 );
> +
> +    # ...but *dont* reset the cache, as this holiday was not really written to the db
> +    # its only used to mock a holiday insert for 1 test in t/db_dependent/Holidays.t

Should not be a method here, but moved to the test file or a test module.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list