Skip to content

Commit

Permalink
set cach default scope to step for size vars
Browse files Browse the repository at this point in the history
  • Loading branch information
janowicz committed Oct 26, 2018
1 parent ae9cb34 commit 77ab93e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions variable_generators/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ def func():
return func


def make_size_var(agent, geog, geog_id):
def make_size_var(agent, geog, geog_id, cache_scope='step'):
"""
Generator function for size variables. Registers with orca.
"""
var_name = 'total_' + agent

@orca.column(geog, var_name, cache=True, cache_scope='iteration')
@orca.column(geog, var_name, cache=True, cache_scope=cache_scope)
def func():
agents = orca.get_table(agent)
print('Calculating number of {} for {}'.format(agent, geog))
Expand Down

0 comments on commit 77ab93e

Please sign in to comment.