pebblebed 0.0.34 → 0.0.35

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Pebblebed
4
4
  class Client
5
5
  # TTL is reset for every cache hit, so actual TTL might be much longer
6
6
  # as long as the user keeps hitting that cache.
7
- IDENTITY_MEMBERSHIPS_TTL = 10
7
+ IDENTITY_MEMBERSHIPS_TTL = 7
8
8
 
9
9
  def initialize(connector)
10
10
  @connector = connector
@@ -28,7 +28,8 @@ module Pebblebed
28
28
  result = Pebblebed.memcached.fetch(cache_key, IDENTITY_MEMBERSHIPS_TTL) do
29
29
  @connector.checkpoint.get("/identities/#{identity}/memberships").to_json
30
30
  end
31
- Pebblebed.memcached.touch(cache_key, IDENTITY_MEMBERSHIPS_TTL)
31
+ # Reinstate this line when memcached version >= 1.4.8
32
+ # Pebblebed.memcached.touch(cache_key, IDENTITY_MEMBERSHIPS_TTL)
32
33
  JSON.parse(result)
33
34
  end
34
35
 
@@ -6,7 +6,7 @@ module Sinatra
6
6
  module Helpers
7
7
  # Cache identity for this amount of seconds. TTL will be reset each cache hit,
8
8
  # so real TTL might be much longer than this.
9
- IDENTITY_CACHE_TTL = 10
9
+ IDENTITY_CACHE_TTL = 7
10
10
 
11
11
  # Render the markup for a part. A partspec takes the form
12
12
  # "<kit>.<partname>", e.g. "base.post"
@@ -44,7 +44,8 @@ module Sinatra
44
44
  cache_key = "identity-for-session-#{current_session}"
45
45
  @identity = ::Pebblebed.memcached.get(cache_key)
46
46
  if @identity
47
- ::Pebblebed.memcached.touch(cache_key, IDENTITY_CACHE_TTL)
47
+ # Reinstate this line when memcached version >= 1.4.8
48
+ # ::Pebblebed.memcached.touch(cache_key, IDENTITY_CACHE_TTL)
48
49
  return @identity
49
50
  end
50
51
  @identity = pebbles.checkpoint.get("/identities/me")[:identity]
@@ -1,3 +1,3 @@
1
1
  module Pebblebed
2
- VERSION = "0.0.34"
2
+ VERSION = "0.0.35"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebblebed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-25 00:00:00.000000000 Z
13
+ date: 2012-11-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -328,7 +328,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
328
  version: '0'
329
329
  segments:
330
330
  - 0
331
- hash: -2833651708453981054
331
+ hash: -2078905709827241052
332
332
  required_rubygems_version: !ruby/object:Gem::Requirement
333
333
  none: false
334
334
  requirements:
@@ -337,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  version: '0'
338
338
  segments:
339
339
  - 0
340
- hash: -2833651708453981054
340
+ hash: -2078905709827241052
341
341
  requirements: []
342
342
  rubyforge_project: pebblebed
343
343
  rubygems_version: 1.8.24