fastentry 0.1.10 → 0.1.11
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.
- checksums.yaml +4 -4
- data/app/controllers/fastentry/cache_controller.rb +2 -2
- data/lib/fastentry.rb +8 -6
- data/lib/fastentry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7db1335e41d587e0fb35535f44f14b034583e93b00aa2c74911f27ede92242fd
|
|
4
|
+
data.tar.gz: 304bbbd821a39fcff2e7bb8ad8d1a93b32921ee5a9050e8866d293f85717a38c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8958e93c3bd9dff0dfbf11beff8dd5a50879900bad13230cb48da86f5d2979812c00e373e2649b945928df48ef158988c704a31eb4391b304587dc671f983996
|
|
7
|
+
data.tar.gz: 6c7dd46799df6e69eb160535667aeee37f38718e2617dbe9b56c28fc444cb06e427a854869b62b840a6fe6defbe810e67396680be41d214249dda742f853eb0b
|
|
@@ -13,7 +13,7 @@ module Fastentry
|
|
|
13
13
|
key = params[:key]
|
|
14
14
|
Fastentry.cache.delete(key)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
redirect_to root_path
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def invalidate_multiple
|
|
@@ -22,7 +22,7 @@ module Fastentry
|
|
|
22
22
|
Fastentry.cache.delete(key)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
redirect_to root_path
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/fastentry.rb
CHANGED
|
@@ -20,15 +20,17 @@ module Fastentry
|
|
|
20
20
|
|
|
21
21
|
def self.for(cache)
|
|
22
22
|
if ::Rails::VERSION::MAJOR >= 5
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
# Comparing cache name due to class require statements:
|
|
24
|
+
## ex. https://github.com/rails/rails/blob/94b5cd3a20edadd6f6b8cf0bdf1a4d4919df86cb/activesupport/lib/active_support/cache/redis_cache_store.rb#L5
|
|
25
|
+
case cache.class.name
|
|
26
|
+
when "ActiveSupport::Cache::FileStore"
|
|
25
27
|
DefaultCache.new(cache)
|
|
26
|
-
when ActiveSupport::Cache::
|
|
28
|
+
when "ActiveSupport::Cache::MemoryStore"
|
|
27
29
|
DefaultCache.new(cache)
|
|
28
|
-
when ActiveSupport::Cache::
|
|
29
|
-
DefaultCache.new(cache)
|
|
30
|
-
when ActiveSupport::Cache::RedisCacheStore
|
|
30
|
+
when "ActiveSupport::Cache::RedisCacheStore"
|
|
31
31
|
RedisCache.new(cache)
|
|
32
|
+
when "ActiveSupport::Cache::MemCacheStore"
|
|
33
|
+
DefaultCache.new(cache)
|
|
32
34
|
else
|
|
33
35
|
raise ArgumentError, 'Unsupported cache type'
|
|
34
36
|
end
|
data/lib/fastentry/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastentry
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tiago Alves
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|