Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby client for IronCache

This branch is 65 commits behind master

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:

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

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.