This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: last tweaks before next major version bump (#114)
- Loading branch information
1 parent
630afd7
commit 873c901
Showing
6 changed files
with
37 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"cachu": major | ||
--- | ||
|
||
refactor!: last tweaks before next major version bump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export type InitializeCache = (config?: { | ||
maxAge?: number | string | ||
maxAmount?: number | ||
autodelete?: boolean | ||
}) => { | ||
add: (key: any, value: any, maxAge?: number | string) => Promise<void> | ||
addMany: (...entries: ([any, any, number | string] | [any, any])[]) => Promise<void> | ||
get: (key: any) => Promise<any> | ||
getMany: (...keys: any[]) => Promise<any[]> | ||
update: (key: any, value: any) => Promise<void> | ||
updateMany: (...entries: [any, any][]) => Promise<void> | ||
remove: (key: any) => Promise<void> | ||
removeMany: (...keys: any[]) => Promise<void> | ||
has: (key: any) => Promise<boolean> | ||
size: () => Promise<number> | ||
keys: () => Promise<any[]> | ||
values: () => Promise<any[]> | ||
clear: () => Promise<void> | ||
} | ||
|
||
export const useCache: InitializeCache |