only refresh metadata when necessary
Merge pull request #55 from dimagi/perf1

only refresh metadata when necessary