soulheart 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa6ff567d686c5f140070353f43c781d3f107d03
4
- data.tar.gz: f7deec1aad57f8c6b3bc6aff48148a5a00e0650d
3
+ metadata.gz: 6ea5dc27c836697c1fdbf001f73cbed523f68224
4
+ data.tar.gz: 9cc198b63222b8bfbb9503178ce913996046526e
5
5
  SHA512:
6
- metadata.gz: a63c0a2f5ff9ca50c49b8fd1566f16a035b0b84c11648a54f7e59313c34fd158614b2cdad8c887ab12061732a96732b7ded6882235bea38037dc57d79b463b3a
7
- data.tar.gz: 12cc9ff62e26a1dd31115863a88dcfcfd525b5942b207f66c8c02ffcf4faf27ae9244718c67d10848fd07f323b9a6643376981d90c8327b74851de615aa47fe5
6
+ metadata.gz: ba0fd796cc5a6d631936ca12b04583add3ff2f46e5cf5e711fe6b0606c8c191facf6d5c5e9aeb0dba34801cf9503c8eadfd39a1d878b2bbd563fc7f8a33b6825
7
+ data.tar.gz: 18e922688690e0126b9e2722ee800677c2015366893b8b592ac07bacd1c2ae583473910a6cf510efd336dd05cba2984c08978cccdd7affe73e64f0658ae909ea
@@ -55,20 +55,22 @@ module Soulheart
55
55
  # everything will work itself out as soon as the cache expires again.
56
56
  end
57
57
 
58
- def remove_results_hash
58
+ def remove_results_hash(cat_ids)
59
59
  # delete the data store
60
60
  # We don't do this every time we clear because because it breaks the caching feature.
61
61
  # The option to clear this is only called in testing right now.
62
62
  # There should be an option to clear it other times though.
63
+ cat_ids.map { |cat_id| redis.expire(no_query_id(cat_id), 0) }
63
64
  redis.expire results_hashes_id, 0
64
65
  redis.del(results_hashes_id)
65
66
  end
66
67
 
67
68
  def clear(remove_results=false)
68
- category_combos.each {|cat| delete_data(category_id(cat)) }
69
+ cat_ids = category_combos.map { |cat| category_id(cat) }
70
+ cat_ids.each {|cat_id| delete_data(cat_id) }
69
71
  delete_categories
70
72
  delete_data
71
- remove_results_hash if remove_results
73
+ remove_results_hash(cat_ids) if remove_results
72
74
  end
73
75
 
74
76
  def load(items)
@@ -1,3 +1,3 @@
1
1
  module Soulheart
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soulheart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Herr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-18 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hiredis