performance issues
estani opened this issue · comments
We've seen that most of the time in test where spent in this Gem, it turned out to be a problem form our side, since the "region" was passed as string, instead of "symbol".
This caused Holiday Gem to work, but it just overlooked the cache silently.
if cached_holidays = Factory::Definition.cache_repository.find(start_date, end_date, options)
return cached_holidays
end
If options is guarantee to be only an array of symbols (don't know the API), you could either validate that or converted to symbols, for matching the cache (I mean just options.map {|o| o.to_sym}
)
Since strings are accepted, as it works as expected, I think the cache should accept them too, right?