File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ def save_cache(self):
161161 else :
162162 c ["blocks" ] = set (c ["blocks" ]).union (cache [k ]["blocks" ])
163163 c ["time" ] = max (c ["time" ], cache [k ]["time" ])
164+ c ["uid" ] = cache [k ]["uid" ]
164165
165166 # Files can be added to cache after it was written once
166167 for k , c in cache .items ():
Original file line number Diff line number Diff line change @@ -528,6 +528,8 @@ def test_filecache_with_checks():
528528
529529 assert fs .cat (f1 ) == data # does not change
530530 assert fs2 .cat (f1 ) == data * 2 # changed, since origin changed
531+ with fs2 .open (f1 ) as f :
532+ assert f .read () == data * 2 # read also sees new data
531533 time .sleep (0.11 ) # allow cache details to expire
532534 assert fs .cat (f1 ) == data * 2 # changed, since origin changed
533535
You can’t perform that action at this time.
0 commit comments