anmo 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ require "dalli"
2
2
 
3
3
  module Anmo
4
4
  class ApplicationDataStore
5
+ TTL = 1000000
5
6
  def self.objects
6
7
  cached_objects = server.get("objects")
7
8
  return JSON.load(cached_objects) if cached_objects
@@ -17,13 +18,13 @@ module Anmo
17
18
  def self.insert_object object
18
19
  all_objects = objects
19
20
  all_objects.unshift(object)
20
- server.set("objects", JSON.dump(all_objects))
21
+ server.set("objects", JSON.dump(all_objects), TTL)
21
22
  end
22
23
 
23
24
  def self.save_request request
24
25
  all_requests = requests
25
26
  all_requests << request
26
- server.set("requests", JSON.dump(all_requests))
27
+ server.set("requests", JSON.dump(all_requests), TTL)
27
28
  end
28
29
 
29
30
  def self.clear_objects
@@ -1,3 +1,3 @@
1
1
  module Anmo
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: