Sha256: 7f057b9270ef2d33ab85efaf310593e041d9bd83a1328c79a374e9bc655c8dd5

Contents?: true

Size: 450 Bytes

Versions: 10

Compression:

Stored size: 450 Bytes

Contents

module Innate
  class Cache
    # Memory cache is simply a Hash with the Cache::API, it's the reference
    # implementation for every other cache.

    class Memory < Hash
      include Cache::API

      def cache_store(*args)
        super{|key, value| self[key] = value }
      end

      def cache_fetch(*args)
        super{|key| self[key] }
      end

      def cache_delete(*args)
        super{|key| delete(key) }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
manveru-innate-2009.02.06 lib/innate/cache/memory.rb
manveru-innate-2009.02.21 lib/innate/cache/memory.rb
manveru-innate-2009.02.25 lib/innate/cache/memory.rb
manveru-innate-2009.03.24 lib/innate/cache/memory.rb
manveru-innate-2009.04.01 lib/innate/cache/memory.rb
manveru-innate-2009.04.08 lib/innate/cache/memory.rb
manveru-innate-2009.04.18 lib/innate/cache/memory.rb
manveru-innate-2009.04 lib/innate/cache/memory.rb
innate-2009.04.12 lib/innate/cache/memory.rb
innate-2009.04 lib/innate/cache/memory.rb