lib/bolt_server/file_cache.rb in bolt-3.16.0 vs lib/bolt_server/file_cache.rb in bolt-3.16.1

- old
+ new

@@ -180,7 +180,19 @@ FileUtils.remove_dir(dir) end end end end + + def get_cached_project_file(versioned_project, file_name) + file_dir = create_cache_dir(versioned_project) + file_path = File.join(file_dir, file_name) + serial_execute { File.read(file_path) if File.exist?(file_path) } + end + + def cache_project_file(versioned_project, file_name, data) + file_dir = create_cache_dir(versioned_project) + file_path = File.join(file_dir, file_name) + serial_execute { File.open(file_path, 'w') { |f| f.write(data) } } + end end end