mudis 0.4.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dc10c0b461aac92e8c559f3e3a97b7654d6c3480c8ba8755fbe10f083945183
4
- data.tar.gz: 90292495545e270316d273f525d306c77ca1351e47ac99207d2739352b472f6e
3
+ metadata.gz: c8a43b94197d868d77feb4f2499899faa1c8c38606b166406e7dab9ad4d92b80
4
+ data.tar.gz: ce0a499a83d0397766624554949e9eefdd3434ccf763e0fc810613bef911dff4
5
5
  SHA512:
6
- metadata.gz: 72fcae767bb8d79492b66b76854c65bf30b776caa1a4dd7c1342da6972fe68ca65a54ec56c796a799503681576cf40827d8d85916ea674a9d48c25debc314409
7
- data.tar.gz: 2b2886cbdfebb83d63c5093812d898383d33f6b9a6eea60bf3a119c3b72b345d516d7416281cfd18146a2665e4c151bc301dbc7999eca82aea4e8aea495b0759
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 v0.3.0** | **MemoryStore** (`Rails.cache`) | **FastCache** | **Zache** | **EasyCache** | **MiniCache** |
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
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- MUDIS_VERSION = "0.4.1"
3
+ MUDIS_VERSION = "0.4.2"
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, Integer]
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
@@ -0,0 +1,7 @@
1
+ class MudisConfig
2
+ attr_accessor serializer : Object
3
+ attr_accessor compress : bool
4
+ attr_accessor max_value_bytes : Integer?
5
+ attr_accessor hard_memory_limit : bool
6
+ attr_accessor max_bytes : Integer
7
+ 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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kiebor81
@@ -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: