Sha256: 1540b357670a7a665ae7fb3bf26c52bc3382f17a4270b51f6336e283beec4748
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
module Lux CACHE_SERVER ||= Lux::Cache.new CACHE ||= {}.to_hwia def var CACHE end # Lux.cache.fetch ... -> pass to cache server # Lux.cache(:key) {} -> in memory no clear cache def cache key=nil if block_given? raise AargumentError.new('Cache key not given') unless key CACHE[key] ||= yield else CACHE_SERVER end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lux-fw-0.6.2 | ./lib/lux/cache/lux_adapter.rb |