Locking strategy for db_file cache