atomic_mem_cache_store 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -53,6 +53,11 @@ It supports the same parameters as [ActiveSupport::Cache::MemCacheStore](http://
53
53
 
54
54
  - If you try to access key value directly be careful as you will bypass the atomicity mechanism. (this will work though even if the expiration of the key will be longer than expected).
55
55
 
56
+ - Current implementation will double number of memcache read AND write (to read
57
+ the lock). It could be reduced but at the expense of changing the nature of
58
+ key (make it array or prefix it) thus making it uncompatible with direct access, multiget and adding
59
+ complexe type support overhead.
60
+
56
61
  ## TL;DR
57
62
 
58
63
  Basically unless you are doing weird stuff without your cache store, this should be a drop-in replacement with no real corner cases. Worse that can happen is more query to memcache, and slightly longer expiry on keys.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -1,10 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "atomic_mem_cache_store/version"
4
2
 
5
3
  Gem::Specification.new do |s|
6
4
  s.name = "atomic_mem_cache_store"
7
- s.version = AtomicMemCacheStore::VERSION
5
+ s.version = File.read(File.join(File.dirname(__FILE__),'VERSION') ).strip
8
6
  s.authors = ["Renaud (Nel) Morvan"]
9
7
  s.email = ["nel@w3fu.com"]
10
8
  s.homepage = "https://github.com/nel/atomic_mem_cache_store"
@@ -19,6 +17,7 @@ Gem::Specification.new do |s|
19
17
  s.require_paths = ["lib"]
20
18
 
21
19
  s.add_development_dependency "rspec"
20
+ s.add_development_dependency "rake"
22
21
  s.add_runtime_dependency "activesupport", ">2.1"
23
22
  s.add_runtime_dependency "memcache-client"
24
23
  end
@@ -1,6 +1,7 @@
1
1
  require 'active_support'
2
2
 
3
3
  class AtomicMemCacheStore < ActiveSupport::Cache::MemCacheStore
4
+ VERSION = File.read(File.join(File.dirname(__FILE__),'..','VERSION') ).strip
4
5
  NEWLY_STORED = "STORED\r\n"
5
6
 
6
7
  class << self; attr_accessor :grace_period; end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_mem_cache_store
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renaud (Nel) Morvan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-26 00:00:00 Z
18
+ date: 2012-02-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
@@ -32,9 +32,23 @@ dependencies:
32
32
  type: :development
33
33
  version_requirements: *id001
34
34
  - !ruby/object:Gem::Dependency
35
- name: activesupport
35
+ name: rake
36
36
  prerelease: false
37
37
  requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: activesupport
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
38
52
  none: false
39
53
  requirements:
40
54
  - - ">"
@@ -45,11 +59,11 @@ dependencies:
45
59
  - 1
46
60
  version: "2.1"
47
61
  type: :runtime
48
- version_requirements: *id002
62
+ version_requirements: *id003
49
63
  - !ruby/object:Gem::Dependency
50
64
  name: memcache-client
51
65
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
66
+ requirement: &id004 !ruby/object:Gem::Requirement
53
67
  none: false
54
68
  requirements:
55
69
  - - ">="
@@ -59,7 +73,7 @@ dependencies:
59
73
  - 0
60
74
  version: "0"
61
75
  type: :runtime
62
- version_requirements: *id003
76
+ version_requirements: *id004
63
77
  description: Rails memcached store optimized for the thundering herb issue. This limit cache recalculation to a single process while as long as key is not swept by LRU. Drop-in replacement of Rails memcached store.
64
78
  email:
65
79
  - nel@w3fu.com
@@ -77,7 +91,6 @@ files:
77
91
  - VERSION
78
92
  - atomic_mem_cache_store.gemspec
79
93
  - lib/atomic_mem_cache_store.rb
80
- - lib/atomic_mem_cache_store/version.rb
81
94
  - spec/lib/atomic_mem_cache_store_spec.rb
82
95
  - spec/spec_helper.rb
83
96
  homepage: https://github.com/nel/atomic_mem_cache_store
@@ -1,5 +0,0 @@
1
- require File.join(File.dirname(__FILE__),'..','atomic_mem_cache_store')
2
-
3
- class AtomicMemCacheStore
4
- VERSION = File.read(File.join(File.dirname(__FILE__),'..', '..','VERSION') ).strip
5
- end