reader_writer_cache_store 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Manifest CHANGED
@@ -2,5 +2,4 @@ Manifest
2
2
  README
3
3
  README.rdoc
4
4
  Rakefile
5
- lib/reader_writer_cache_store.rb
6
- lib/reader_writer_cache_store/active_support/cache/reader_writer_cache_store.rb
5
+ lib/active_support/cache/reader_writer_cache_store.rb
@@ -0,0 +1,29 @@
1
+ Reader/Writer Cache Store
2
+ Billy Kimble, 2011/03/01
3
+
4
+ This gem is intended to be used in a situation where you have 1 cache store that you write to, but 1 or more than you read from separate from the write store. This is a common method of offloading cycles in a MySQL master/slave setup. All writes go to master, all reads pull from slave.
5
+
6
+ I created this specifically to be used with a Redis cache store where your remote cache store may be on 1 server, but you have a slave copy of that server's cache data running elsewhere. To cut down on constant cross-server operations you should have a slave cache on every application server. Though created with redis in mind, it doesn't care about your cache store. It should be flexible to use with any replicating cache server.
7
+
8
+ Credit to Ben Marini (https://github.com/bmarini) for the the original implementation.
9
+
10
+ ----
11
+
12
+ Use:
13
+
14
+ In your application.rb or environment specific config file, instead of:
15
+
16
+ config.cache_store = :redis_store, {:host => '10.1.1.2', :port => 6379, :db => 0, :compress => true, :compress_threshold => 100}
17
+
18
+ separate your readers and writers via a key:
19
+
20
+ config.cache_store = :reader_writer_cache_store, {
21
+ :writers => [
22
+ {:redis_store, {:host => '10.1.1.2', :port => 6379, :db => 0, :compress => true, :compress_threshold => 100}}
23
+ ],
24
+ :readers => [
25
+ {:redis_store, {:host => '127.0.0.1', :port => 6379, :db => 0, :compress => true, :compress_threshold => 100}}
26
+ ]
27
+ }
28
+
29
+
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'echoe'
4
4
  require 'rake/testtask'
5
5
 
6
- Echoe.new('reader_writer_cache_store', '0.1.0') do |p|
6
+ Echoe.new('reader_writer_cache_store', '0.1.1') do |p|
7
7
  p.description = "Reader/Writer Cache Store"
8
8
  p.url = "https://github.com/bkimble"
9
9
  p.author = "Billy Kimble"
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reader_writer_cache_store}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Billy Kimble"]
9
9
  s.date = %q{2011-03-02}
10
10
  s.description = %q{Reader/Writer Cache Store}
11
11
  s.email = %q{basslines@gmail.com}
12
- s.extra_rdoc_files = ["README", "README.rdoc", "lib/reader_writer_cache_store.rb", "lib/reader_writer_cache_store/active_support/cache/reader_writer_cache_store.rb"]
13
- s.files = ["Manifest", "README", "README.rdoc", "Rakefile", "lib/reader_writer_cache_store.rb", "lib/reader_writer_cache_store/active_support/cache/reader_writer_cache_store.rb", "reader_writer_cache_store.gemspec"]
12
+ s.extra_rdoc_files = ["README", "README.rdoc", "lib/active_support/cache/reader_writer_cache_store.rb"]
13
+ s.files = ["Manifest", "README", "README.rdoc", "Rakefile", "lib/active_support/cache/reader_writer_cache_store.rb", "reader_writer_cache_store.gemspec"]
14
14
  s.homepage = %q{https://github.com/bkimble}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Reader_writer_cache_store", "--main", "README"]
16
16
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reader_writer_cache_store
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Billy Kimble
@@ -28,15 +28,13 @@ extensions: []
28
28
  extra_rdoc_files:
29
29
  - README
30
30
  - README.rdoc
31
- - lib/reader_writer_cache_store.rb
32
- - lib/reader_writer_cache_store/active_support/cache/reader_writer_cache_store.rb
31
+ - lib/active_support/cache/reader_writer_cache_store.rb
33
32
  files:
34
33
  - Manifest
35
34
  - README
36
35
  - README.rdoc
37
36
  - Rakefile
38
- - lib/reader_writer_cache_store.rb
39
- - lib/reader_writer_cache_store/active_support/cache/reader_writer_cache_store.rb
37
+ - lib/active_support/cache/reader_writer_cache_store.rb
40
38
  - reader_writer_cache_store.gemspec
41
39
  has_rdoc: true
42
40
  homepage: https://github.com/bkimble
File without changes