Sha256: b089b8fda843f5bbcb10559a0fe31ebc1b3922005f1429ed231515a065cfa5aa

Contents?: true

Size: 266 Bytes

Versions: 15

Compression:

Stored size: 266 Bytes

Contents

require 'ehcache'

manager = Ehcache::CacheManager.new
cache = manager.cache

cache.put("answer", "42", {:ttl => 120})
answer = cache.get("answer")
puts "Answer: #{answer}"

question = cache.get("question") || 'unknown'
puts "Question: #{question}"

manager.shutdown

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
jruby-ehcache-rails3-1.3.2 examples/jruby-ehcache.rb
jruby-ehcache-rails2-1.3.2 examples/jruby-ehcache.rb
jruby-ehcache-1.3.2 examples/jruby-ehcache.rb
jruby-ehcache-rails3-1.3.1 examples/jruby-ehcache.rb
jruby-ehcache-rails2-1.3.1 examples/jruby-ehcache.rb
jruby-ehcache-1.3.1 examples/jruby-ehcache.rb
jruby-ehcache-rails3-1.3.0 examples/jruby-ehcache.rb
jruby-ehcache-rails2-1.3.0 examples/jruby-ehcache.rb
jruby-ehcache-1.3.0 examples/jruby-ehcache.rb
jruby-ehcache-1.2.1 examples/jruby-ehcache.rb
jruby-ehcache-1.2.0 examples/jruby-ehcache.rb
jruby-ehcache-1.1.2 examples/jruby-ehcache.rb
jruby-ehcache-1.1.1 examples/jruby-ehcache.rb
jruby-ehcache-1.1.0 examples/jruby-ehcache.rb
jruby-ehcache-1.0.0 examples/jruby-ehcache.rb