lru_redux 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/lru_redux.rb +2 -0
- data/lib/lru_redux/cache.rb +7 -16
- data/lib/lru_redux/thread_safe_cache_jruby.rb +13 -0
- data/lib/lru_redux/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44f9731a90a6a4021eec3488c38c5a82399f7089
|
4
|
+
data.tar.gz: cd4f27cc1d9eca928e1a1e8c9b75507a4c06a81d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5b6832027fc7e09a7e319981ef2acc9399b11fdce5015c7c24354f6e50dbc8794b056cc995733387dbc9b658e67bc610b92a55dc905905f53b7d8e1f8a50398
|
7
|
+
data.tar.gz: ac925de76a377ffd499c20c626f4eb650232b4deb888cd7958452a24c425ce0a64fe6a8e62373d6c8e8e2a1bc3bd0f14f4aeb54475fb70edb1cf6bea2ae061a4
|
data/README.md
CHANGED
@@ -95,6 +95,10 @@ lru_redux thread safe 2.530000 0.000000 2.530000 ( 2.532061)
|
|
95
95
|
|
96
96
|
## Changlog
|
97
97
|
|
98
|
+
###version 0.8.4 - 20-Feb-2014
|
99
|
+
|
100
|
+
- Fix: regression of ThreadSafeCache under JRuby 1.7 @Sevrius
|
101
|
+
|
98
102
|
###version 0.8.3 - 20-Feb-2014
|
99
103
|
|
100
104
|
- Perf: improve ThreadSafeCache performance @Sevrius
|
data/lib/lru_redux.rb
CHANGED
data/lib/lru_redux/cache.rb
CHANGED
@@ -89,25 +89,16 @@ class LruRedux::Cache
|
|
89
89
|
|
90
90
|
def delete(key)
|
91
91
|
node = @data.delete(key)
|
92
|
+
|
92
93
|
return unless node
|
93
94
|
|
94
|
-
|
95
|
-
|
96
|
-
if @head.nil?
|
97
|
-
@tail = nil
|
98
|
-
else
|
99
|
-
@head[3] = nil
|
100
|
-
end
|
101
|
-
elsif node[0].nil?
|
102
|
-
@tail = @tail[3]
|
103
|
-
@tail[0] = nil
|
104
|
-
else
|
105
|
-
prev = node[0]
|
106
|
-
nex = node[3]
|
95
|
+
prev = node[0]
|
96
|
+
nex = node[3]
|
107
97
|
|
108
|
-
|
109
|
-
|
110
|
-
|
98
|
+
nex ? nex[0] = prev : @head = prev
|
99
|
+
prev ? prev[3] = nex : @tail = nex
|
100
|
+
|
101
|
+
node[2]
|
111
102
|
end
|
112
103
|
|
113
104
|
def clear
|
data/lib/lru_redux/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lru_redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/lru_redux/cache.rb
|
113
113
|
- lib/lru_redux/cache19.rb
|
114
114
|
- lib/lru_redux/thread_safe_cache.rb
|
115
|
+
- lib/lru_redux/thread_safe_cache_jruby.rb
|
115
116
|
- lib/lru_redux/version.rb
|
116
117
|
- lru_redux.gemspec
|
117
118
|
- test/cache_test.rb
|