simple-in-memory-cache
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -1,14 +0,15 @@ | ||
export interface SimpleInMemoryCache { | ||
export interface SimpleInMemoryCache<T> { | ||
get: (key: string) => T | undefined; | ||
set: (key: string, value: T, options?: { | ||
secondsUntilExpiration?: number; | ||
}) => void; | ||
} | ||
export interface SimpleInMemoryCacheState<T> { | ||
[index: string]: { | ||
value: any; | ||
value: T; | ||
expiresAtMse: number; | ||
}; | ||
} | ||
export declare const createCache: ({ defaultSecondsUntilExpiration }?: { | ||
export declare const createCache: <T>({ defaultSecondsUntilExpiration }?: { | ||
defaultSecondsUntilExpiration?: number | undefined; | ||
}) => { | ||
set: (key: string, value: any, { secondsUntilExpiration }?: { | ||
secondsUntilExpiration?: number | undefined; | ||
}) => void; | ||
get: (key: string) => any; | ||
}; | ||
}) => SimpleInMemoryCache<T>; |
{ | ||
"name": "simple-in-memory-cache", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A simple in-memory cache, for nodejs and the browser, with time based expiration policies.", | ||
@@ -8,3 +8,3 @@ "author": "UladKasach @uladkasach", | ||
"repository": "uladkasach/simple-in-memory-cache", | ||
"homepage": "https://github.com/uladkasach/simple-in-memory-cache", | ||
"homepage": "https://github.com/ehmpathy/simple-in-memory-cache", | ||
"keywords": [ | ||
@@ -24,3 +24,3 @@ "cache", | ||
], | ||
"bugs": "https://github.com/uladkasach/simple-in-memory-cache/issues", | ||
"bugs": "https://github.com/ehmpathy/simple-in-memory-cache/issues", | ||
"main": "dist/index.js", | ||
@@ -27,0 +27,0 @@ "engines": { |
# simple-in-memory-cache | ||
![ci_on_commit](https://github.com/uladkasach/simple-in-memory-cache/workflows/ci_on_commit/badge.svg) | ||
![deploy_on_tag](https://github.com/uladkasach/simple-in-memory-cache/workflows/deploy_on_tag/badge.svg) | ||
![ci_on_commit](https://github.com/ehmpathy/simple-in-memory-cache/workflows/ci_on_commit/badge.svg) | ||
![deploy_on_tag](https://github.com/ehmpathy/simple-in-memory-cache/workflows/deploy_on_tag/badge.svg) | ||
@@ -6,0 +6,0 @@ A simple in-memory cache, for nodejs and the browser, with time based expiration policies. |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
7762
10
44