Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quantos/micro-request

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quantos/micro-request - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

2

dist/micro_request.d.ts

@@ -8,2 +8,3 @@ import { Entity } from './interfaces/entity';

declare function get<T>(options: MicroRequestGetOptions): Promise<T>;
declare function invalidateOne(id: any, cachePrefix?: string): Promise<void>;
declare const MicroRequest: {

@@ -13,3 +14,4 @@ getOne: typeof getOne;

get: typeof get;
invalidateOne: typeof invalidateOne;
};
export default MicroRequest;

@@ -105,2 +105,12 @@ "use strict";

}
function invalidateOne(id, cachePrefix) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield redis_cache_1.RedisCache.invalidate(id, cachePrefix);
}
catch (e) {
console.error(e);
}
});
}
const MicroRequest = {

@@ -110,4 +120,5 @@ getOne,

get,
invalidateOne,
};
exports.default = MicroRequest;
//# sourceMappingURL=micro_request.js.map

@@ -8,2 +8,3 @@ import { Entity } from './interfaces/entity';

}): Promise<void>;
static invalidate(id: any, cachePrefix?: string): Promise<void>;
}

@@ -81,4 +81,12 @@ "use strict";

}
static invalidate(id, cachePrefix) {
return __awaiter(this, void 0, void 0, function* () {
if (!_redisEnabled) {
return;
}
yield redisClient.del(`${cachePrefix}:${id}`);
});
}
}
exports.RedisCache = RedisCache;
//# sourceMappingURL=redis_cache.js.map

2

package.json
{
"name": "@quantos/micro-request",
"version": "1.1.4",
"version": "1.1.5",
"description": "Quantos http client with cache, retry and fallback mechanism",

@@ -5,0 +5,0 @@ "author": "fabriziotognetto <info@quantos.it>",

@@ -123,2 +123,10 @@ import { fallbackErrorHandler } from './fallback_error_handler';

async function invalidateOne(id: any, cachePrefix?: string): Promise<void> {
try {
await RedisCache.invalidate(id, cachePrefix);
} catch (e) {
console.error(e);
}
}
const MicroRequest = {

@@ -128,4 +136,5 @@ getOne,

get,
invalidateOne,
};
export default MicroRequest;

@@ -69,2 +69,9 @@ import { createClient, RedisClientType } from 'redis';

}
static async invalidate(id: any, cachePrefix?: string): Promise<void> {
if (!_redisEnabled) {
return;
}
await redisClient.del(`${cachePrefix}:${id}`);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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