Class: Kovid::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/kovid/cache.rb

Instance Method Summary collapse

Constructor Details

#initializeCache

Returns a new instance of Cache.



6
7
8
# File 'lib/kovid/cache.rb', line 6

def initialize
  @memory = {}
end

Instance Method Details

#get(request) ⇒ Object



10
11
12
# File 'lib/kovid/cache.rb', line 10

def get(request)
  @memory[request]
end

#set(request, response) ⇒ Object



14
15
16
# File 'lib/kovid/cache.rb', line 14

def set(request, response)
  @memory[request] = response
end