Module: Perforated
- Extended by:
- Perforated
- Included in:
- Perforated
- Defined in:
- lib/perforated.rb,
lib/perforated/cache.rb,
lib/perforated/version.rb,
lib/perforated/strategy.rb,
lib/perforated/rebuilder.rb,
lib/perforated/compatibility/fetch_multi.rb
Defined Under Namespace
Modules: Compatibility, Strategy
Classes: Cache, Rebuilder
Constant Summary
collapse
- VERSION =
'0.10.1'
Instance Method Summary
collapse
Instance Method Details
#cache ⇒ Object
16
17
18
|
# File 'lib/perforated.rb', line 16
def cache
@cache ||= ActiveSupport::Cache::MemoryStore.new
end
|
#cache=(new_cache) ⇒ Object
12
13
14
|
# File 'lib/perforated.rb', line 12
def cache=(new_cache)
@cache = new_cache
end
|
28
29
30
|
# File 'lib/perforated.rb', line 28
def configure
yield self
end
|
#json ⇒ Object
24
25
26
|
# File 'lib/perforated.rb', line 24
def json
@json ||= JSON
end
|
#json=(new_json) ⇒ Object
20
21
22
|
# File 'lib/perforated.rb', line 20
def json=(new_json)
@json = new_json
end
|
#new(*args) ⇒ Object
8
9
10
|
# File 'lib/perforated.rb', line 8
def new(*args)
Perforated::Cache.new(*args)
end
|
#reset! ⇒ Object
32
33
34
35
|
# File 'lib/perforated.rb', line 32
def reset!
@cache = nil
@json = nil
end
|