Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby client for IronCache
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
README.md
Rakefile
VERSION.yml
iron_cache.gemspec

README.md

IronMQ Ruby Client

Getting Started

Install the gem:

gem install iron_cache

Create an IronMQ client object:

@iron_cache = IronCache::Client.new(:token=>'MYTOKEN', :project_id=>'MYPROJECTID')

You can get your token and project_id at http://www.iron.io .

The Basics

Put an item in the cache:

msg = @iron_cache.items.put("mykey", "hello world!")
p msg

Get an item from the cache:

msg = @iron_cache.items.get("mykey")
p msg

Delete an item from the cache:

res = msg.delete # or @iron_cache.items.delete("mykey")
p res

Queue Selection

One of the following:

  1. Pass :cache_name=>'my_cache' into IronCache::Client.new
  2. @iron_cache.cache_name = 'my_cache'
  3. Pass :cache_name=>'my_cache' into any post(), get(), or delete()

Queue Information

cache = @iron_cache.queues.get(:name=>"my_cache")
puts "size: #{cache.size}"
Something went wrong with that request. Please try again.