@realvare/based 2.5.6 → 2.5.7

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.
@@ -62,6 +62,21 @@ class CacheManager {
62
62
  return this.caches[cacheName]?.getStats();
63
63
  }
64
64
 
65
+ // Enhanced cleanup for bad ACK entries
66
+ on(event, callback) {
67
+ if (event === 'bad_ack') {
68
+ // Setup cleanup listener for bad ACKs
69
+ this.badAckCallback = callback;
70
+ }
71
+ }
72
+
73
+ // Method to trigger bad ACK cleanup
74
+ cleanupBadAck(key) {
75
+ if (this.badAckCallback) {
76
+ this.badAckCallback(key);
77
+ }
78
+ }
79
+
65
80
  shutdown() {
66
81
  if (this.memoryCheckInterval) {
67
82
  clearInterval(this.memoryCheckInterval);
@@ -70,4 +85,4 @@ class CacheManager {
70
85
  }
71
86
  }
72
87
 
73
- module.exports = new CacheManager();
88
+ module.exports = new CacheManager();