Module: Cache::DalliClient

Defined in:
lib/cache/dalli_client.rb

Instance Method Summary collapse

Instance Method Details

#_delete(k) ⇒ Object



18
19
20
# File 'lib/cache/dalli_client.rb', line 18

def _delete(k)
  @metal.delete k
end

#_exist?(k) ⇒ Boolean

sux

Returns:

  • (Boolean)


27
28
29
# File 'lib/cache/dalli_client.rb', line 27

def _exist?(k)
  !@metal.get(k).nil?
end

#_flushObject



22
23
24
# File 'lib/cache/dalli_client.rb', line 22

def _flush
  @metal.flush
end

#_get(k) ⇒ Object



6
7
8
# File 'lib/cache/dalli_client.rb', line 6

def _get(k)
  @metal.get k
end

#_get_multi(ks) ⇒ Object



10
11
12
# File 'lib/cache/dalli_client.rb', line 10

def _get_multi(ks)
  @metal.get_multi ks
end

#_set(k, v, ttl) ⇒ Object



14
15
16
# File 'lib/cache/dalli_client.rb', line 14

def _set(k, v, ttl)
  @metal.set k, v, ttl
end

#_statsObject



31
32
33
# File 'lib/cache/dalli_client.rb', line 31

def _stats
  @metal.stats
end

#after_forkObject



2
3
4
# File 'lib/cache/dalli_client.rb', line 2

def after_fork
  @metal.close
end

#cas(k, ttl = nil, &blk) ⇒ Object



41
42
43
44
# File 'lib/cache/dalli_client.rb', line 41

def cas(k, ttl = nil, &blk)
  handle_fork
  @metal.cas k, extract_ttl(ttl), &blk
end

#fetch(k, ttl = nil, &blk) ⇒ Object

native



36
37
38
39
# File 'lib/cache/dalli_client.rb', line 36

def fetch(k, ttl = nil, &blk)
  handle_fork
  @metal.fetch k, extract_ttl(ttl), &blk
end