@helium/account-fetch-cache
Advanced tools
Comparing version 0.2.15 to 0.2.16
@@ -187,6 +187,2 @@ "use strict"; | ||
const dispose = this.watch(id, parser, !!data); | ||
const cacheEntry = this.genericCache.get(address); | ||
if (!this.genericCache.has(address) || cacheEntry != data) { | ||
this.updateCache(address, data || null); | ||
} | ||
return [data, dispose]; | ||
@@ -241,5 +237,4 @@ }); | ||
}; | ||
// Only set the cache for defined static accounts. Static accounts can change if they go from nonexistant to existant. | ||
// Rely on searchAndWatch to set the generic cache for everything else. | ||
if (isStatic && result && result.info) { | ||
const cacheEntry = this.genericCache.get(address); | ||
if (!this.genericCache.has(address) || cacheEntry != result) { | ||
this.updateCache(address, result); | ||
@@ -246,0 +241,0 @@ } |
@@ -168,6 +168,2 @@ import { Connection, PublicKey, Transaction } from "@solana/web3.js"; | ||
const dispose = this.watch(id, parser, !!data); | ||
const cacheEntry = this.genericCache.get(address); | ||
if (!this.genericCache.has(address) || cacheEntry != data) { | ||
this.updateCache(address, data || null); | ||
} | ||
return [data, dispose]; | ||
@@ -222,5 +218,4 @@ } | ||
}; | ||
// Only set the cache for defined static accounts. Static accounts can change if they go from nonexistant to existant. | ||
// Rely on searchAndWatch to set the generic cache for everything else. | ||
if (isStatic && result && result.info) { | ||
const cacheEntry = this.genericCache.get(address); | ||
if (!this.genericCache.has(address) || cacheEntry != result) { | ||
this.updateCache(address, result); | ||
@@ -227,0 +222,0 @@ } |
{ | ||
"name": "@helium/account-fetch-cache", | ||
"version": "0.2.15", | ||
"version": "0.2.16", | ||
"description": "Solana account fetch cache to eliminate reduntant fetching, and batch fetches", | ||
@@ -42,3 +42,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "b1663cbd0ed0e0f60bb2158abac5bf26a23635e3" | ||
"gitHead": "7421b7bd6a13c0981b5191113da714bb638c7533" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
127374
1056