New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dw-cache

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dw-cache - npm Package Compare versions

Comparing version 0.0.45 to 0.0.46

6

dist/index.js

@@ -1,2 +0,2 @@

/*! dw-cache v0.0.45 https://github.com/falsandtru/dw-cache | (c) 2021, falsandtru | (Apache-2.0 AND MPL-2.0) License */
/*! dw-cache v0.0.46 https://github.com/falsandtru/dw-cache | (c) 2021, falsandtru | (Apache-2.0 AND MPL-2.0) License */
(function webpackUniversalModuleDefinition(root, factory) {

@@ -373,2 +373,3 @@ if(typeof exports === 'object' && typeof module === 'object')

offset: 0,
block: 20,
sweep: 10,

@@ -402,2 +403,3 @@ limit: 950

this.space = settings.space;
this.block = settings.block;
this.limit = settings.limit;

@@ -460,3 +462,3 @@ this.earlyExpiring = settings.earlyExpiring;

default:
if (this.misses > LRU.length) {
if (this.misses * 100 > LRU.length * this.block) {
this.sweep ||= this.sweep = LRU.length * this.settings.sweep / 100 | 0 || 1;

@@ -463,0 +465,0 @@

{
"name": "dw-cache",
"version": "0.0.45",
"version": "0.0.46",
"description": "Dual window cache adaptively coordinates the ratio of LRU to LFU using the two sliding windows.",

@@ -53,3 +53,3 @@ "private": false,

"npm-check-updates": "^16.0.1",
"spica": "0.0.587",
"spica": "0.0.588",
"ts-loader": "^9.3.1",

@@ -56,0 +56,0 @@ "typescript": "4.7.4",

@@ -57,5 +57,5 @@ # Dual Window Cache

LRU hit rate 16.4%
DWC hit rate 17.9%
DWC - LRU hit rate delta 1.4%
DWC / LRU hit rate ratio 108%
DWC hit rate 18.3%
DWC - LRU hit rate delta 1.8%
DWC / LRU hit rate ratio 111%

@@ -70,3 +70,3 @@ OLTP 500

LRU hit rate 28.2%
DWC hit rate 34.7%
DWC hit rate 34.6%
DWC - LRU hit rate delta 6.4%

@@ -91,6 +91,56 @@ DWC / LRU hit rate ratio 122%

```
GLI 250
LRU hit rate 0.9%
DWC hit rate 10.7%
DWC - LRU hit rate delta 9.8%
DWC / LRU hit rate ratio 1157%
GLI 500
LRU hit rate 0.9%
DWC hit rate 23.0%
DWC - LRU hit rate delta 22.0%
DWC / LRU hit rate ratio 2386%
GLI 750
LRU hit rate 1.1%
DWC hit rate 38.1%
DWC - LRU hit rate delta 37.0%
DWC / LRU hit rate ratio 3279%
GLI 1,000
LRU hit rate 11.2%
DWC hit rate 46.9%
DWC - LRU hit rate delta 35.6%
DWC / LRU hit rate ratio 418%
GLI 1,250
LRU hit rate 21.2%
DWC hit rate 47.6%
DWC - LRU hit rate delta 26.3%
DWC / LRU hit rate ratio 224%
GLI 1,500
LRU hit rate 36.5%
DWC hit rate 54.3%
DWC - LRU hit rate delta 17.7%
DWC / LRU hit rate ratio 148%
GLI 1,750
LRU hit rate 45.0%
DWC hit rate 54.1%
DWC - LRU hit rate delta 9.1%
DWC / LRU hit rate ratio 120%
GLI 2,000
LRU hit rate 57.4%
DWC hit rate 57.4%
DWC - LRU hit rate delta 0
DWC / LRU hit rate ratio 100%
```
```
LOOP 100
LRU hit rate 0%
DWC hit rate 4.4%
DWC - LRU hit rate delta 4.4%
DWC hit rate 5.1%
DWC - LRU hit rate delta 5.1%
DWC / LRU hit rate ratio Infinity

@@ -100,4 +150,4 @@

LRU hit rate 0%
DWC hit rate 18.2%
DWC - LRU hit rate delta 18.2%
DWC hit rate 19.7%
DWC - LRU hit rate delta 19.7%
DWC / LRU hit rate ratio Infinity

@@ -107,4 +157,4 @@

LRU hit rate 0%
DWC hit rate 44.4%
DWC - LRU hit rate delta 44.4%
DWC hit rate 46.4%
DWC - LRU hit rate delta 46.4%
DWC / LRU hit rate ratio Infinity

@@ -114,4 +164,4 @@

LRU hit rate 0%
DWC hit rate 70.0%
DWC - LRU hit rate delta 70.0%
DWC hit rate 70.3%
DWC - LRU hit rate delta 70.3%
DWC / LRU hit rate ratio Infinity

@@ -121,4 +171,4 @@

LRU hit rate 0%
DWC hit rate 93.9%
DWC - LRU hit rate delta 93.9%
DWC hit rate 95.1%
DWC - LRU hit rate delta 95.1%
DWC / LRU hit rate ratio Infinity

@@ -133,3 +183,4 @@

https://github.com/dgraph-io/ristretto
https://github.com/dgraph-io/ristretto<br>
https://github.com/dgraph-io/benchmarks

@@ -212,2 +263,3 @@ ### Throughput

readonly offset?: number;
readonly block?: number;
readonly sweep?: number;

@@ -214,0 +266,0 @@ readonly limit?: number;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc