Commit 9bd7b817 authored by Rajko Albrecht's avatar Rajko Albrecht

Store with CAS not extra class anymore but a monkeypatch of Redis::Store

parent 50e2de45
require 'redis'
require 'redis/store'
require 'redis/store-with-cas'
class Redis
class StoreWithCas < Store
end
end
require 'redis'
require 'redis/store'
require 'redis/store_with_cas/cas'
require 'redis/store_with_cas/version'
require 'redis/store-with-cas/cas'
require 'redis/store-with-cas/version'
require 'redis/store/marshalling'
require 'redis/store/namespace'
require 'redis/store_with_cas/namespace'
require 'redis/store-with-cas/namespace'
class Redis
class StoreWithCas < Store
class Store < self
include Cas
end
......
class Redis
# simple enhancement of Redis::Store
class StoreWithCas < Store
class Store < self
# Implements Compare-And-Swap (or as Redis says Compare-And-Save)
# on top of Redis::Store using Redis::Store::watch. It is designated for simple values, not redis-lists/hashes etc
......
# -*- encoding: utf-8 -*-
$:.push File.expand_path('../lib', __FILE__)
require 'redis/store_with_cas/version'
require 'redis/store-with-cas/version'
Gem::Specification.new do |s|
s.name = 'redis-store-with-cas'
s.version = Redis::StoreWithCas::VERSION
s.authors = ['Rajko Albrecht']
s.email = ['ral@alwins-world.de']
s.homepage = 'http://redis-store.org/redis-store'
s.homepage = 'https://git.alwin-it.de/alwin/redis-store-with-cas'
s.summary = %q{Extend redis store for Ruby frameworks with cas}
s.description = %q{Extend the redis store with CAS (compare-and-swap) functionality for better cache integrity support}
......
......@@ -2,7 +2,7 @@ require 'test_helper'
describe Redis::StoreWithCas do
def setup
@store = Redis::StoreWithCas.new :namespace => 'storetest'
@store = Redis::Store.new :namespace => 'storetest'
end
def teardown
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment