This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cachemire | |
extend ActiveSupport::Concern | |
included do | |
class_attribute :cache_store | |
end | |
module ClassMethods | |
private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'bundler', '~> 1.3' | |
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enumerator#lazy is very slow and should only be used when iterating over large/infinite collections | |
# where you know you are going to get your results quite early in the iteration. | |
require 'benchmark/ips' | |
Benchmark.ips do |r| | |
r.report("map") do | |
(0..50).map{ |i| 'lol' if i.even? } | |
end | |