# class Puppet::Indirector::Memory

Manage a memory-cached list of instances.

### Public Class Methods

new() click to toggle source

    # File lib/puppet/indirector/memory.rb, line 5
    def initialize
      @instances = {}
    end

### Public Instance Methods

destroy(request) click to toggle source

    # File lib/puppet/indirector/memory.rb, line 9
    def destroy(request)
      raise ArgumentError.new("Could not find #{request.key} to destroy") unless @instances.include?(request.key)
      @instances.delete(request.key)
    end

find(request) click to toggle source

    # File lib/puppet/indirector/memory.rb, line 14
    def find(request)
      @instances[request.key]
    end

save(request) click to toggle source

    # File lib/puppet/indirector/memory.rb, line 18
    def save(request)
      @instances[request.key] = request.instance
    end