https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36350

--- Comment #22 from David Cook <[email protected]> ---
Comment on attachment 177371
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177371
Bug 36350: Add caching for Objects::find and Objects::search

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

::: Koha/Objects/Cached.pm
@@ +30,5 @@
> +    my $cache_key = $class->_objects_cache_cache_key('find', @args);
> +    # Store in the args bucket if has column value condiditions
> +    # or for some reason the attributes argument is provided
> +    my $has_options = @args > 1 && ref $args[$#args] eq 'HASH';
> +    my $cache = !($has_options && defined $args[$#args]->{cache} && 
> !$args[$#args]->{cache});

I'm a bit wary of cache being used here, since "cache" is a DBIx::Class
attribute for DBIx::Class::ResultSet methods:
https://metacpan.org/pod/DBIx::Class::ResultSet#cache

::: Koha/Patron.pm
@@ +730,5 @@
>              next if $patron_id eq $anonymous_patron;
>  
> +            # Don't use cache as this could risk deleting a patron object
> +            #  which has a reference outside of this class
> +            my $patron = Koha::Patrons->find( $patron_id, { cache => 0 } );

Bit wary of this cache attribute as per my other comment...

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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/

Reply via email to