mudis 0.4.0 → 0.4.2
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/README.md +1 -1
- data/lib/mudis/version.rb +1 -1
- data/sig/mudis.rbs +22 -12
- data/sig/mudis_config.rbs +7 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8a43b94197d868d77feb4f2499899faa1c8c38606b166406e7dab9ad4d92b80
|
4
|
+
data.tar.gz: ce0a499a83d0397766624554949e9eefdd3434ccf763e0fc810613bef911dff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66963f1f1a627647fe7504ada52dd27f872fd06a107ca9dd03102271d33bb7d803e15f93a0a29d95679b9fad83c1e28920a95629074db611295be354e675178a
|
7
|
+
data.tar.gz: d0fed0c0df073b86f4433338e32860556467fef209f059ec670e293a938029090d625d8ee59f416fe2e807607eece7e4343943285a1c136d1cb82cace813236b
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ There are plenty out there, in various states of maintenance and in many shapes
|
|
21
21
|
|
22
22
|
#### Feature / Function Comparison
|
23
23
|
|
24
|
-
| **Feature** | **Mudis
|
24
|
+
| **Feature** | **Mudis** | **MemoryStore** (`Rails.cache`) | **FastCache** | **Zache** | **EasyCache** | **MiniCache** |
|
25
25
|
| -------------------------------------- | ---------------- | ------------------------------- | -------------- | ------------- | ------------- | -------------- |
|
26
26
|
| **LRU eviction strategy** | ✅ Per-bucket | ✅ Global | ✅ Global | ❌ | ❌ | ✅ Simplistic |
|
27
27
|
| **TTL expiry support** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
data/lib/mudis/version.rb
CHANGED
data/sig/mudis.rbs
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
-
# sig/mudis.rbs
|
2
|
-
|
3
1
|
class Mudis
|
4
2
|
# Configuration
|
5
3
|
class << self
|
6
4
|
attr_accessor serializer : Object
|
7
5
|
attr_accessor compress : bool
|
8
6
|
attr_accessor max_value_bytes : Integer?
|
7
|
+
attr_accessor hard_memory_limit : bool
|
8
|
+
attr_reader max_bytes : Integer
|
9
|
+
def max_bytes=: (Integer) -> void
|
10
|
+
|
11
|
+
def configure: () { (config: MudisConfig) -> void } -> void
|
12
|
+
def config: () -> MudisConfig
|
13
|
+
def apply_config!: () -> void
|
9
14
|
end
|
10
15
|
|
11
16
|
# Lifecycle
|
@@ -13,27 +18,32 @@ class Mudis
|
|
13
18
|
def self.stop_expiry_thread: () -> void
|
14
19
|
|
15
20
|
# Core operations
|
16
|
-
def self.write: (String, untyped, ?expires_in: Integer) -> void
|
17
|
-
def self.read: (String) -> untyped?
|
18
|
-
def self.update: (String) { (untyped) -> untyped } -> void
|
19
|
-
def self.delete: (String) -> void
|
20
|
-
def self.exists?: (String) -> bool
|
21
|
+
def self.write: (String, untyped, ?expires_in: Integer, ?namespace: String) -> void
|
22
|
+
def self.read: (String, ?namespace: String) -> untyped?
|
23
|
+
def self.update: (String, ?namespace: String) { (untyped) -> untyped } -> void
|
24
|
+
def self.delete: (String, ?namespace: String) -> void
|
25
|
+
def self.exists?: (String, ?namespace: String) -> bool
|
21
26
|
|
22
27
|
# DSL & Helpers
|
23
28
|
def self.fetch: (
|
24
29
|
String,
|
25
30
|
?expires_in: Integer,
|
26
|
-
?force: bool
|
31
|
+
?force: bool,
|
32
|
+
?namespace: String
|
27
33
|
) { () -> untyped } -> untyped
|
28
34
|
|
29
|
-
def self.clear: (String) -> void
|
30
|
-
def self.replace: (String, untyped, ?expires_in: Integer) -> void
|
31
|
-
def self.inspect: (String) -> Hash[Symbol, untyped]?
|
35
|
+
def self.clear: (String, ?namespace: String) -> void
|
36
|
+
def self.replace: (String, untyped, ?expires_in: Integer, ?namespace: String) -> void
|
37
|
+
def self.inspect: (String, ?namespace: String) -> Hash[Symbol, untyped]?
|
32
38
|
|
33
39
|
# Introspection & management
|
34
|
-
def self.metrics: () -> Hash[Symbol,
|
40
|
+
def self.metrics: () -> Hash[Symbol, untyped]
|
35
41
|
def self.cleanup_expired!: () -> void
|
36
42
|
def self.all_keys: () -> Array[String]
|
37
43
|
def self.current_memory_bytes: () -> Integer
|
38
44
|
def self.max_memory_bytes: () -> Integer
|
45
|
+
|
46
|
+
# State reset
|
47
|
+
def self.reset!: () -> void
|
48
|
+
def self.reset_metrics!: () -> void
|
39
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mudis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kiebor81
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.12'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.12'
|
27
27
|
description: Thread-safe, bucketed, in-process cache for Ruby apps. Drop-in replacement
|
28
28
|
for Kredis in some scenarios.
|
29
29
|
email:
|
@@ -31,12 +31,14 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files:
|
33
33
|
- sig/mudis.rbs
|
34
|
+
- sig/mudis_config.rbs
|
34
35
|
files:
|
35
36
|
- README.md
|
36
37
|
- lib/mudis.rb
|
37
38
|
- lib/mudis/version.rb
|
38
39
|
- lib/mudis_config.rb
|
39
40
|
- sig/mudis.rbs
|
41
|
+
- sig/mudis_config.rbs
|
40
42
|
- spec/mudis_spec.rb
|
41
43
|
homepage: https://github.com/kiebor81/mudis
|
42
44
|
licenses:
|
@@ -50,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
52
|
requirements:
|
51
53
|
- - ">="
|
52
54
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
55
|
+
version: '3.0'
|
54
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
57
|
requirements:
|
56
58
|
- - ">="
|