soulheart 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soulheart/loader.rb +7 -10
- data/lib/soulheart/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df407f0c3c5f2585652ae42da30e5cbf7ad54827
|
4
|
+
data.tar.gz: 35b7e98e2772fa4b5674fa95fec7489df9ef87e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 562d4597850ae2b2e9c83228427dffaaf9333db21a8923522826466eaac838d008fe08434382e804e0b0f1a7f5883234a29b84dff07ae1d47e1465a38f37c249
|
7
|
+
data.tar.gz: 45d6a5cec1d5feb44b666230905f068370f365dfdeca7f6a88d00eeb55548c3ba808b2bdfd1691ff2b74ec6ef38ede6955b6353a40d0e369798faafa5759c6b6
|
data/lib/soulheart/loader.rb
CHANGED
@@ -55,22 +55,19 @@ module Soulheart
|
|
55
55
|
# everything will work itself out as soon as the cache expires again.
|
56
56
|
end
|
57
57
|
|
58
|
-
def
|
59
|
-
#
|
60
|
-
#
|
61
|
-
|
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) }
|
58
|
+
def clear_cache
|
59
|
+
# Remove the remove_results_hash
|
60
|
+
# has to be called before the cat_ids are cleared
|
61
|
+
category_combos.map { |cat| redis.expire(no_query_id(category_id(cat)), 0) }
|
64
62
|
redis.expire results_hashes_id, 0
|
65
63
|
redis.del(results_hashes_id)
|
66
64
|
end
|
67
65
|
|
68
|
-
def clear(
|
69
|
-
|
70
|
-
|
66
|
+
def clear(should_clear_cache = false)
|
67
|
+
clear_cache if should_clear_cache
|
68
|
+
category_combos.each {|cat| delete_data(category_id(cat)) }
|
71
69
|
delete_categories
|
72
70
|
delete_data
|
73
|
-
remove_results_hash(cat_ids) if remove_results
|
74
71
|
end
|
75
72
|
|
76
73
|
def load(items)
|
data/lib/soulheart/version.rb
CHANGED