module Mcache
Constants
- VERSION
Public Class Methods
configure(&block)
click to toggle source
# File lib/mcache.rb, line 11 def self.configure(&block) @config = Mcache::Config.new @config.instance_eval &block if block_given? @connection = Mcache::Connection.new( @config.host, @config.pool_size, @config.timeout, @config.options ) end
fetch(key, options = {}) { || ... }
click to toggle source
# File lib/mcache.rb, line 23 def self.fetch(key, options = {}) Mcache::Client.new.fetch(key, options) do yield end end
Private Class Methods
connection()
click to toggle source
# File lib/mcache.rb, line 31 def self.connection configure unless @connection @connection end