Class: OpenfireAdmin::SystemCache

Inherits:
Object
  • Object
show all
Defined in:
lib/openfire_admin/system_cache.rb

Overview

cache control. this instance can clear cache.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, cacheID, name) ⇒ SystemCache

Returns a new instance of SystemCache.



26
27
28
29
30
# File 'lib/openfire_admin/system_cache.rb', line 26

def initialize(client, cacheID, name)
  @client = client
  @cacheID = cacheID
  @name = name
end

Instance Attribute Details

#cacheIDObject (readonly)

Returns the value of attribute cacheID.



25
26
27
# File 'lib/openfire_admin/system_cache.rb', line 25

def cacheID
  @cacheID
end

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/openfire_admin/system_cache.rb', line 25

def name
  @name
end

Instance Method Details

#clearObject

clear cache



35
36
37
# File 'lib/openfire_admin/system_cache.rb', line 35

def clear
  @client.system_cache_clear( @cacheID )
end

#to_sObject



31
32
33
# File 'lib/openfire_admin/system_cache.rb', line 31

def to_s
  "#<#{self.class} (#{@cacheID})#{name.inspect}>"
end