lock averages cache by file