*Disable RPC caching for now
This commit is contained in:
parent
89f2be35f7
commit
f5099a4546
|
@ -81,7 +81,7 @@ export class RPC {
|
||||||
const hash = this._pluginApi.util.crypto
|
const hash = this._pluginApi.util.crypto
|
||||||
.createHash(stringify(tempRequest))
|
.createHash(stringify(tempRequest))
|
||||||
.toString("hex");
|
.toString("hex");
|
||||||
this._cache.set(hash, response);
|
// this._cache.set(hash, response);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
success: !response.error,
|
success: !response.error,
|
||||||
|
|
|
@ -133,7 +133,7 @@ const plugin: Plugin = {
|
||||||
api.registerMethod("execution_request", {
|
api.registerMethod("execution_request", {
|
||||||
cacheable: false,
|
cacheable: false,
|
||||||
async handler(request: ExecutionRequest): Promise<object> {
|
async handler(request: ExecutionRequest): Promise<object> {
|
||||||
const cache = provider.rpc.getCachedRequest(request);
|
/* const cache = provider.rpc.getCachedRequest(request);
|
||||||
|
|
||||||
if (cache) {
|
if (cache) {
|
||||||
return cache;
|
return cache;
|
||||||
|
@ -148,7 +148,9 @@ const plugin: Plugin = {
|
||||||
|
|
||||||
if (RPC_NO_CACHE.includes(request.method)) {
|
if (RPC_NO_CACHE.includes(request.method)) {
|
||||||
provider.rpc.deleteCachedRequest(request);
|
provider.rpc.deleteCachedRequest(request);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
let ret = await provider.rpc.request(request);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return { ...ret, id: request.id ?? ret.id };
|
return { ...ret, id: request.id ?? ret.id };
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue