
Security News
TeamPCP and BreachForums Launch $1,000 Contest for Supply Chain Attacks
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.
@types/memory-cache
Advanced tools
npm install --save @types/memory-cache
This package contains type definitions for memory-cache (https://github.com/ptarjan/node-cache).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memory-cache.
// Type definitions for memory-cache 0.2
// Project: https://github.com/ptarjan/node-cache
// Definitions by: Jeff Goddard <https://github.com/jedigo>
// Travis Thieman <https://github.com/thieman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Originally imported from: https://github.com/soywiz/typescript-node-definitions/memory-cache.d.ts
export class CacheClass<K, V> {
put(key: K, value: V, time?: number, timeoutCallback?: (key: K, value: V) => void): V;
get(key: K): V | null;
del(key: K): boolean;
clear(): void;
size(): number;
memsize(): number;
debug(bool: boolean): void;
hits(): number;
misses(): number;
keys(): K[];
/**
* @returns The new size of the cache
* @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-}
*/
importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number;
/**
* @returns A JSON string representing all the cache data
*/
exportJson(): string;
}
export const Cache: typeof CacheClass;
export function put<V>(key: any, value: V, time?: number, timeoutCallback?: (key: any, value: any) => void): V;
export function get(key: any): any;
export function del(key: any): boolean;
export function clear(): void;
export function size(): number;
export function memsize(): number;
export function debug(bool: boolean): void;
export function hits(): number;
export function misses(): number;
export function keys(): any[];
/**
* @returns The new size of the cache
* @see {@link https://github.com/ptarjan/node-cache#importjson--functionjson-string-options--skipduplicates-boolean-}
*/
export function importJson(json: string, options?: { skipDuplicates?: boolean | undefined }): number;
/**
* @returns A JSON string representing all the cache data
*/
export function exportJson(): string;
These definitions were written by Jeff Goddard, and Travis Thieman.
FAQs
TypeScript definitions for memory-cache
The npm package @types/memory-cache receives a total of 135,923 weekly downloads. As such, @types/memory-cache popularity was classified as popular.
We found that @types/memory-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.

Research
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.