class Utils::Finder

def index_expired?(path)

Returns:
  • (TrueClass, FalseClass) - true if the index file has expired, false otherwise

Parameters:
  • path (String) -- the filesystem path to the index file being checked
def index_expired?(path)
  if duration = @config.discover.index_expire_after
    Time.now - duration >= File.mtime(path)
  else
    false
  end
rescue Errno::ENOENT
  false
end