lib/valnzbn/lookup.rb in valnzbn-0.1.3 vs lib/valnzbn/lookup.rb in valnzbn-0.1.4
- old
+ new
@@ -46,10 +46,10 @@
JSON.parse(namespaced_redis.get(number) || '{}', symbolize_names: true)
else
{}
end
- if cache.any? && Time.at(cache['expires_at']) > Time.now
+ if cache.any? && Time.at(cache[:expires_at]) > Time.now
cache
else
begin
response = HTTParty.get("#{url}#{number}", headers: { 'Authorization' => "Bearer #{@@access_token}" }).parsed_response
response = JSON.parse(response.to_json, symbolize_names: true)
\ No newline at end of file