Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Kue is a Rails ready key value store that uses active-record under the hood.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib Version bump
spec Using Rspec 3 be_truthy / be_falsey expectations
.gitignore Fixing Depreciation Warnings
.rspec Added spec's and test's | Addition of the delete key | Update to 0.4
.rvmrc Added spec's and test's | Addition of the delete key | Update to 0.4
.travis.yml
Gemfile Added rake to gemfile for travis
LICENSE add license file
README.md Adding travis icon
Rakefile Added default rake task
kue.gemspec Updated to be compatible with Rails 4.1

README.md

Kue

Kue is a Rails ready key value store that uses active-record under the hood.

Build Status

Build Status

What does Kue mean?

K(eyVal)ue

What about real key value stores?

Redis is awesome! But sometimes you just don't want or need the external dependancy!

How do I install Kue?

Install the gem

gem install kue (command line)
gem 'kue'       (gemfile)

Run the generator

rails generate kue:install
rake db:migrate

Use Kue

Set a key and it's value.

KueStore[:any_key_name_you_can_think_of] = "Any object you can dream up"

Get a value by key.

KueStore[:any_key_name_you_can_think_of] 

Don't worry it's not just string value's kue can store for you. It's anything!

KueStore[:my_class_instance] = Foo.new(:name => 1)

Find out if a key exists?

KueStore.exists?(:my_class_instance)

Delete a key and it's value

KueStore.delete!(:my_class_instance)

List all the keys in the KueStore

KueStore.keys

Clear all keys and values from the KueStore

KueStore.clear!

Get a count of all the key/value pairs

KueStore.count

Don't like the KueStore class name?

No problem. Just include the Kue::Store module inside of your own class.

class MyStore < ActiveRecord::Base
  include Kue::Store
end

MyStore[:all_good] = 1
Something went wrong with that request. Please try again.