Class: ActiveSupport::Cache::MemcacheConnectionPool
- Inherits:
-
Object
- Object
- ActiveSupport::Cache::MemcacheConnectionPool
- Defined in:
- lib/active_support/cache/memcache_connection_pool.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #decrement(name, amount = 1, options = nil) ⇒ Object
- #delete(name, options = nil) ⇒ Object
- #exist?(name, options = nil) ⇒ Boolean
- #fetch(name, options = nil) ⇒ Object
- #increment(name, amount = 1, options = nil) ⇒ Object
-
#initialize(options) ⇒ MemcacheConnectionPool
constructor
A new instance of MemcacheConnectionPool.
- #read(name, options = nil) ⇒ Object
- #read_multi(*names) ⇒ Object
- #reset(options = {}) ⇒ Object (also: #clear)
- #write(name, value, options = nil) ⇒ Object
Constructor Details
#initialize(options) ⇒ MemcacheConnectionPool
Returns a new instance of MemcacheConnectionPool.
6 7 8 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 6 def initialize() = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 4 def end |
Instance Method Details
#decrement(name, amount = 1, options = nil) ⇒ Object
52 53 54 55 56 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 52 def decrement(name, amount = 1, =nil) with_connection do connection.decrement name, amount, end end |
#delete(name, options = nil) ⇒ Object
34 35 36 37 38 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 34 def delete(name, =nil) with_connection do connection.delete name, end end |
#exist?(name, options = nil) ⇒ Boolean
28 29 30 31 32 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 28 def exist?(name, =nil) with_connection do connection.exist? name, end end |
#fetch(name, options = nil) ⇒ Object
10 11 12 13 14 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 10 def fetch(name, =nil) with_connection do connection.fetch name, end end |
#increment(name, amount = 1, options = nil) ⇒ Object
46 47 48 49 50 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 46 def increment(name, amount = 1, =nil) with_connection do connection.increment name, amount, end end |
#read(name, options = nil) ⇒ Object
16 17 18 19 20 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 16 def read(name, =nil) with_connection do connection.read name, end end |
#read_multi(*names) ⇒ Object
40 41 42 43 44 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 40 def read_multi(*names) with_connection do connection.read_multi *names end end |
#reset(options = {}) ⇒ Object Also known as: clear
58 59 60 61 62 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 58 def reset(={}) with_connection do connection.reset end end |
#write(name, value, options = nil) ⇒ Object
22 23 24 25 26 |
# File 'lib/active_support/cache/memcache_connection_pool.rb', line 22 def write(name, value, =nil) with_connection do connection.write name, value, end end |