cacheflow 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/lib/cacheflow/redis.rb +2 -3
- data/lib/cacheflow/sidekiq.rb +24 -0
- data/lib/cacheflow/version.rb +1 -1
- data/lib/cacheflow.rb +5 -26
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0860f01c1abf80c54762bfdf0c80c191fa2ea956144958ffe4352a6fe0ad523c'
|
4
|
+
data.tar.gz: 519476b589957dc270569af29f7e57334f9ac7dff2cfa8d54771f531901a0d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2639a41bda572120361f2f8f13e5924478aa1a410931b2256679bc97e37869fb7439c57ab48ab577f8a0f82a1fc2c705df7d198b66d8ec7e19ce8ed9b081facd
|
7
|
+
data.tar.gz: 368024e42b9d7a838847ba671f9ce91079bbd0ea0f879b70702dd00c2cf84df61f0ef30b32c67c54a86d397a008f508f5373e39a16360c87471f2cfb75d6fcd3
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/lib/cacheflow/redis.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Cacheflow
|
2
|
+
module Sidekiq
|
3
|
+
module ClassMethods
|
4
|
+
def redis(*_)
|
5
|
+
Cacheflow.silence do
|
6
|
+
super
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
module Client
|
12
|
+
module InstanceMethods
|
13
|
+
def push(*_)
|
14
|
+
Cacheflow.silence do
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
::Sidekiq.singleton_class.prepend(Cacheflow::Sidekiq::ClassMethods)
|
24
|
+
::Sidekiq::Client.prepend(Cacheflow::Sidekiq::Client::InstanceMethods)
|
data/lib/cacheflow/version.rb
CHANGED
data/lib/cacheflow.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
require "active_support"
|
3
3
|
|
4
4
|
# modules
|
5
|
-
|
5
|
+
require_relative "cacheflow/version"
|
6
6
|
|
7
7
|
module Cacheflow
|
8
8
|
def self.activate
|
9
|
-
|
10
|
-
|
9
|
+
require_relative "cacheflow/memcached" if defined?(Dalli)
|
10
|
+
require_relative "cacheflow/redis" if defined?(Redis) || defined?(RedisClient)
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.silenced?
|
@@ -25,33 +25,12 @@ module Cacheflow
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.silence_sidekiq!
|
28
|
-
|
29
|
-
::Sidekiq::Client.prepend(Cacheflow::Sidekiq::Client::InstanceMethods)
|
30
|
-
end
|
31
|
-
|
32
|
-
module Sidekiq
|
33
|
-
module ClassMethods
|
34
|
-
def redis(*_)
|
35
|
-
Cacheflow.silence do
|
36
|
-
super
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
module Client
|
42
|
-
module InstanceMethods
|
43
|
-
def push(*_)
|
44
|
-
Cacheflow.silence do
|
45
|
-
super
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
28
|
+
require_relative "cacheflow/sidekiq"
|
50
29
|
end
|
51
30
|
end
|
52
31
|
|
53
32
|
if defined?(Rails)
|
54
|
-
|
33
|
+
require_relative "cacheflow/railtie"
|
55
34
|
else
|
56
35
|
Cacheflow.activate
|
57
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cacheflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- lib/cacheflow/memcached.rb
|
38
38
|
- lib/cacheflow/railtie.rb
|
39
39
|
- lib/cacheflow/redis.rb
|
40
|
+
- lib/cacheflow/sidekiq.rb
|
40
41
|
- lib/cacheflow/version.rb
|
41
42
|
homepage: https://github.com/ankane/cacheflow
|
42
43
|
licenses:
|
@@ -57,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
58
|
- !ruby/object:Gem::Version
|
58
59
|
version: '0'
|
59
60
|
requirements: []
|
60
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.4.6
|
61
62
|
signing_key:
|
62
63
|
specification_version: 4
|
63
64
|
summary: Colorized logging for Memcached and Redis
|