diff --git a/variable_generators/generators.py b/variable_generators/generators.py index 0592e09..a072832 100644 --- a/variable_generators/generators.py +++ b/variable_generators/generators.py @@ -79,13 +79,13 @@ def func(): return func -def make_size_var(agent, geog, geog_id, cache_scope='step', prefix_agent='total'): +def make_size_var(agent, geog, geog_id, cache=True, cache_scope='step', prefix_agent='total'): """ Generator function for size variables. Registers with orca. """ var_name = prefix_agent + '_' + agent - @orca.column(geog, var_name, cache=True, cache_scope=cache_scope) + @orca.column(geog, var_name, cache=cache, cache_scope=cache_scope) def func(): agents = orca.get_table(agent) print('Calculating number of {} for {}'.format(agent, geog))