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

@ribajs/cache

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ribajs/cache - npm Package Compare versions

Comparing version 1.8.0 to 1.9.0-alpha.0

src/services/base-cache.service.ts

8

package.json
{
"name": "@ribajs/cache",
"description": "Cache module of Riba.js",
"version": "1.8.0",
"version": "1.9.0-alpha.0",
"author": "Pascal Garber <pascal@artandcode.studio>",

@@ -35,5 +35,3 @@ "contributors": [

],
"scripts": {
},
"devDependencies": {},
"scripts": {},
"bugs": {

@@ -44,2 +42,2 @@ "url": "https://github.com/ribajs/riba/issues"

"directories": {}
}
}

@@ -1,38 +0,1 @@

/**
* BaseCache it's a simple static cache
*/
class BaseCache<T = any> {
/**
* The Object that keeps all the key value information
*/
public data: {[key: string]: T};
constructor() {
this.data = {};
}
/**
* Set a key and value data, mainly Barba is going to save promises
*
*/
public set(key: string, val: T) {
return this.data[key] = val;
}
/**
* Retrieve the data using the key
*/
public get(key: string): T | undefined {
return this.data[key];
}
/**
* Flush the cache
*/
public reset() {
this.data = {};
}
}
export { BaseCache };
export * from './services';
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