Class: LogLocationCache

Inherits:
Object
  • Object
show all
Defined in:
lib/runit-man/log_location_cache.rb

Constant Summary collapse

TIME_LIMIT =
6000

Instance Method Summary collapse

Constructor Details

#initializeLogLocationCache

Returns a new instance of LogLocationCache.



4
5
6
# File 'lib/runit-man/log_location_cache.rb', line 4

def initialize
  clear
end

Instance Method Details

#[](pid) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/runit-man/log_location_cache.rb', line 8

def [](pid)
  pid = pid.to_i
  unless pids.include?(pid)
    set_pid_log_location(pid, get_pid_location(pid))
  end
  pids[pid][:value]
end