Refactor read_products and its callers
- Promote to public function since it's used in other plugins anyway - Move resolving of addons to read_products (print errors immediately) - Cache product list based on mtime; mostly to reduce the amount of spam from errors as performance was never an issue. - Cache product object in cart entry, so statiegeld_tokens plugin doesn't have to do the lookup all over again.
This commit is contained in:
parent
fdd098e215
commit
5b0c85d770
4 changed files with 56 additions and 46 deletions
|
@ -53,7 +53,7 @@ sub load($class) {
|
|||
RevBank::Eval::clean_eval(qq[
|
||||
use strict;
|
||||
use warnings;
|
||||
use feature qw(signatures);
|
||||
use feature qw(signatures state);
|
||||
no warnings 'experimental::signatures';
|
||||
package $package;
|
||||
BEGIN { RevBank::Global->import; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue