Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby client for IronCache
Ruby
branch: feature-more-d…

This branch is even with iron-io:feature-more-detailed-asserts

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
iron_cache.gemspec

README.md

IronCache Ruby Client

Getting Started

1. Install the gem:

gem install iron_cache

2. Setup your Iron.io credentials: http://dev.iron.io/articles/configuration/

3. Create an IronCache client object:

@client = IronCache::Client.new

The Basics

Get a Cache object

You can have as many caches as you want, each with their own unique set of items.

@cache = @client.cache("my_cache")

Now you can use it:

Put an item in the cache:

@cache.put("mykey", "hello world!")

Get an item from the cache:

item = @cache.get("mykey")
p item.value

Delete an item from the cache:

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

Increment an item in the cache:

msg = @cache.increment("mycounter", 1)
p res

Cache Information

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