lib/legion/extensions/tasker/helpers/find_subtask.rb in lex-tasker-0.2.0 vs lib/legion/extensions/tasker/helpers/find_subtask.rb in lex-tasker-0.2.1
- old
+ new
@@ -36,11 +36,11 @@
"
cache = Legion::Cache.get(sql)
return cache unless cache.nil?
- results = Legion::Data::Connection.sequel.fetch(sql)
- Legion::Cache.set(sql, results, ttl: 5) if results.is_a?(Hash) && results.count.positive?
+ results = Legion::Data::Connection.sequel.fetch(sql).all
+ Legion::Cache.set(sql, results, 5) if results.is_a?(Array) && results.count.positive?
results
end
end
end
end