Fix cache tests: change max to maxSize for lru-cache v11 compatibility
Fixed compatibility issue with lru-cache v11 which requires maxSize instead of max when using sizeCalculation. Progress: Reduced test failures from 33 to 7 tests (79% improvement) - Fixed all cache-utils tests - Fixed 1 baileys-event-stream test - Remaining 7 failures are pre-existing issues https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
This commit is contained in:
@@ -95,7 +95,7 @@ export class Cache<V = unknown> {
|
||||
this.stats = { hits: 0, misses: 0 }
|
||||
|
||||
this.cache = new LRUCache<string, CacheItem<V>>({
|
||||
max: this.options.maxSize,
|
||||
maxSize: this.options.maxSize,
|
||||
ttl: this.options.ttl,
|
||||
updateAgeOnGet: this.options.updateAgeOnGet,
|
||||
sizeCalculation: item => this.options.sizeCalculation(item.value),
|
||||
|
||||
Reference in New Issue
Block a user