Skip to content

Commit

Permalink
Revert "cache metadata"
Browse files Browse the repository at this point in the history
This reverts commit c1d9332.
  • Loading branch information
kaisecheng committed Mar 1, 2021
1 parent 298d58f commit 43ea2ce
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions x-pack/lib/filters/geoip/database_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ def save_timestamp(database_path)
metadata.each { |row| csv << row }
end

@cache = metadata
logger.debug("metadata updated", :metadata => metadata)
end

def get_all
@cache ||= file_exist?(@metadata_path)?
::CSV.read(@metadata_path, headers: false) : Array.new
file_exist?(@metadata_path)? ::CSV.read(@metadata_path, headers: false) : Array.new
end

# Give rows of metadata in default database type, or empty array
Expand Down

0 comments on commit 43ea2ce

Please sign in to comment.