Skip to content

Commit

Permalink
Merge pull request #843 from MolSSI/imm_cache
Browse files Browse the repository at this point in the history
Write records to cache immediately
  • Loading branch information
bennybp authored Jun 6, 2024
2 parents eea42a7 + a31171b commit b66b1b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qcportal/qcportal/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,12 @@ class functions of the record types.

recs = client._fetch_records(record_type, list(records_tofetch), include=include)

# Set up for the writeback
# Set up for the writeback on change, but write the record as-is for now
if record_cache is not None:
record_cache.update_records(recs)
for r in recs:
# Don't write to the cache yet. Let the writeback mechanism handle it
r._record_cache = record_cache
r._cache_dirty = True
r._cache_dirty = False

existing_records += recs

Expand Down

0 comments on commit b66b1b0

Please sign in to comment.