Skip to content

Commit

Permalink
Write records to cache immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
bennybp committed Jun 6, 2024
1 parent eea42a7 commit a31171b
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 a31171b

Please sign in to comment.