Skip to content

milfont/iron_cache_rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IronCache Rails Support Client

Getting Started

You'll need an account at Iron.io first.

Then add this gem to your Gemfile:

gem 'iron_cache_rails'

Using As Rails Cache Store

You can use IronCache as any other rails store. Put iron.json into your project's config dir, add iron_cache_rails to Gemfile and you are ready to go.

config.cache_store = :iron_cache

Alternatively, you can supply project_id and token in code.

config.cache_store = :iron_cache, {project_id: 'XXX', token: 'YYY'}

Using As Rails Session Store

You can use IronCache as any other rails session store. Put iron.json into your project's config dir, add iron_cache_rails to Gemfile and you are ready to go.

config/initializers/session_store.rb :

AppName::Application.config.session_store :iron_cache

Alternatively, you can supply project_id and token in code.

AppName::Application.config.session_store :iron_cache,
                                          project_id: 'XXX',
                                          token: 'YYY',
                                          namespace: 'other-cache-name',
                                          expires_in: 7200

About

Rails cache store and session store using IronCache by www.iron.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%