syncache 1.2 → 1.3

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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/syncache-drb +6 -3
  3. data/syncache.gemspec +1 -1
  4. metadata +19 -17
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ad9a99425eda744305f5d8040e296132bff7e063
4
+ data.tar.gz: 5b9352dd51839233cf65b4463d00b378b6a76cf1
5
+ SHA512:
6
+ metadata.gz: 9fae2c8ec3d435e712430fb251df22472dea9dff97ca8632d0335e416da449665357d4b799d5868c61b34b13376cb95c65e9798851e76ffc097ec3068c5afa01
7
+ data.tar.gz: 333db769142c045ee37527ca36384e491446e39410d82ce3f19a858d144eb4573ab1847c3d6d99723bb478986c5a4bc3543b21406f27dd3ac6fea97d967bff43
@@ -160,15 +160,18 @@ Options:
160
160
  def trap_signals
161
161
  shutdown = lambda do |sig|
162
162
  Thread.new do
163
- sleep 0.1
163
+ sleep 0.01
164
164
  DRb.stop_service
165
165
  end
166
166
  end
167
167
  Signal.trap('INT', shutdown)
168
168
  Signal.trap('TERM', shutdown)
169
169
  Signal.trap('HUP') do |sig| # kill -HUP to flush cache
170
- @cache.flush
171
- log 'cache flushed'
170
+ Thread.new do
171
+ sleep 0.01
172
+ @cache.flush
173
+ log 'cache flushed'
174
+ end
172
175
  end
173
176
  end
174
177
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'syncache'
3
- spec.version = '1.2'
3
+ spec.version = '1.3'
4
4
  spec.author = 'Dmitry Borodaenko'
5
5
  spec.email = 'angdraug@debian.org'
6
6
  spec.homepage = 'https://github.com/angdraug/syncache'
metadata CHANGED
@@ -1,24 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syncache
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
5
- prerelease:
4
+ version: '1.3'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dmitry Borodaenko
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
13
12
  dependencies: []
14
- description: ! "SynCache stores cached objects in a Hash that is protected by an advanced\ntwo-level
15
- locking mechanism which ensures that:\n\n * Multiple threads can add and fetch objects
16
- in parallel.\n * While one thread is working on a cache entry, other threads can
17
- access\n the rest of the cache with no waiting on the global lock, no race\n conditions
18
- nor deadlock or livelock situations.\n * While one thread is performing a long and
19
- resource-intensive\n operation, other threads that request the same data will
20
- be put on hold,\n and as soon as the first thread completes the operation, the
21
- result will be\n returned to all threads.\n"
13
+ description: |
14
+ SynCache stores cached objects in a Hash that is protected by an advanced
15
+ two-level locking mechanism which ensures that:
16
+
17
+ * Multiple threads can add and fetch objects in parallel.
18
+ * While one thread is working on a cache entry, other threads can access
19
+ the rest of the cache with no waiting on the global lock, no race
20
+ conditions nor deadlock or livelock situations.
21
+ * While one thread is performing a long and resource-intensive
22
+ operation, other threads that request the same data will be put on hold,
23
+ and as soon as the first thread completes the operation, the result will be
24
+ returned to all threads.
22
25
  email: angdraug@debian.org
23
26
  executables:
24
27
  - syncache-drb
@@ -41,27 +44,26 @@ files:
41
44
  homepage: https://github.com/angdraug/syncache
42
45
  licenses:
43
46
  - GPL3+
47
+ metadata: {}
44
48
  post_install_message:
45
49
  rdoc_options: []
46
50
  require_paths:
47
51
  - lib
48
52
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
53
  requirements:
51
- - - ! '>='
54
+ - - ">="
52
55
  - !ruby/object:Gem::Version
53
56
  version: '0'
54
57
  required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
58
  requirements:
57
- - - ! '>='
59
+ - - ">="
58
60
  - !ruby/object:Gem::Version
59
61
  version: '0'
60
62
  requirements: []
61
63
  rubyforge_project:
62
- rubygems_version: 1.8.23
64
+ rubygems_version: 2.4.5.1
63
65
  signing_key:
64
- specification_version: 3
66
+ specification_version: 4
65
67
  summary: Thread-safe time-limited cache with flexible replacement policy
66
68
  test_files:
67
69
  - test/ts_syncache.rb