Module: CacheLib::SafeSync

Includes:
MonitorMixin
Included in:
SafeBasicCache, SafeFifoCache, SafeLirsCache, SafeLruCache, SafeTtlCache
Defined in:
lib/cache_lib/safe_sync.rb

Instance Method Summary collapse

Instance Method Details

#clearObject



53
54
55
56
57
# File 'lib/cache_lib/safe_sync.rb', line 53

def clear
  synchronize do
    super
  end
end

#eachObject



65
66
67
68
69
# File 'lib/cache_lib/safe_sync.rb', line 65

def each
  synchronize do
    super
  end
end

#evict(key) ⇒ Object Also known as: delete



47
48
49
50
51
# File 'lib/cache_lib/safe_sync.rb', line 47

def evict(key)
  synchronize do
    super(key)
  end
end

#expireObject



59
60
61
62
63
# File 'lib/cache_lib/safe_sync.rb', line 59

def expire
  synchronize do
    super
  end
end

#fetch(key) ⇒ Object



41
42
43
44
45
# File 'lib/cache_lib/safe_sync.rb', line 41

def fetch(key)
  synchronize do
    super(key)
  end
end

#get(key) ⇒ Object



23
24
25
26
27
# File 'lib/cache_lib/safe_sync.rb', line 23

def get(key)
  synchronize do
    super(key)
  end
end

#initialize(*args) ⇒ Object



7
8
9
# File 'lib/cache_lib/safe_sync.rb', line 7

def initialize(*args)
  super(*args)
end

#inspectObject



95
96
97
98
99
# File 'lib/cache_lib/safe_sync.rb', line 95

def inspect
  synchronize do
    super
  end
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


71
72
73
74
75
# File 'lib/cache_lib/safe_sync.rb', line 71

def key?(key)
  synchronize do
    super(key)
  end
end

#limitObject



11
12
13
14
15
# File 'lib/cache_lib/safe_sync.rb', line 11

def limit
  synchronize do
    super
  end
end

#limit=(*args) ⇒ Object



17
18
19
20
21
# File 'lib/cache_lib/safe_sync.rb', line 17

def limit=(*args)
  synchronize do
    super(*args)
  end
end

#lookup(key) ⇒ Object Also known as: []



35
36
37
38
39
# File 'lib/cache_lib/safe_sync.rb', line 35

def lookup(key)
  synchronize do
    super(key)
  end
end

#rawObject



89
90
91
92
93
# File 'lib/cache_lib/safe_sync.rb', line 89

def raw
  synchronize do
    super
  end
end

#sizeObject



83
84
85
86
87
# File 'lib/cache_lib/safe_sync.rb', line 83

def size
  synchronize do
    super
  end
end

#store(key, value) ⇒ Object Also known as: []=



29
30
31
32
33
# File 'lib/cache_lib/safe_sync.rb', line 29

def store(key, value)
  synchronize do
    super(key, value)
  end
end

#to_aObject



77
78
79
80
81
# File 'lib/cache_lib/safe_sync.rb', line 77

def to_a
  synchronize do
    super
  end
end