Skip to content

Commit

Permalink
Use ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusbv committed Mar 6, 2024
1 parent 5784a75 commit 935872c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module InstanceVerification
def self.update_cache(remote_ip, system_login, product_id, is_byos)
cache_key = [remote_ip, system_login, product_id].join('-')
# caches verification result to be used by zypper auth plugin
Rails.cache.write(cache_key, true, expires_in: 20.minutes) unless is_byos
Rails.cache.write(cache_key, true, expires_in: 24.hours) if is_byos
expire_cache_time = is_byos ? 24.hours : 20.minutes
Rails.cache.write(cache_key, true, expires_in: expire_cache_time)
end

class Engine < ::Rails::Engine
Expand Down

0 comments on commit 935872c

Please sign in to comment.