holderdeord/hdo-storting-importer

View on GitHub
lib/hdo/storting_importer/in_memory_cache.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Hdo
  module StortingImporter
    class InMemoryCache
      def initialize
        @cache = {}
      end

      def fetch(key, &blk)
        @cache[key] ||= yield
      end
    end
  end
end