Module: Voicemeeter::Util::Cache

Included in:
Base
Defined in:
lib/voicemeeter/util.rb

Instance Method Summary collapse

Instance Method Details

#get(name, is_string = false) ⇒ Object



42
43
44
45
46
# File 'lib/voicemeeter/util.rb', line 42

def get(name, is_string = false)
  return cache.delete(name) if cache.key? name
  clear_dirty if @sync
  super
end

#get_buttonstatus(id, mode) ⇒ Object



48
49
50
51
52
# File 'lib/voicemeeter/util.rb', line 48

def get_buttonstatus(id, mode)
  return cache.delete("mb_#{id}_#{mode}") if cache.key? "mb_#{id}_#{mode}"
  clear_dirty if @sync
  super
end