# File lib/locale.rb, line 215 def candidates(options = {}) opts = {:supported_language_tags => nil, :current => current, :type => :common}.merge(options) if Thread.current[:candidates_caches] cache = Thread.current[:candidates_caches][opts.hash] return cache if cache else Thread.current[:candidates_caches] = {} end Thread.current[:candidates_caches][opts.hash] = collect_candidates(opts[:type], opts[:current], opts[:supported_language_tags]) end