File tree Expand file tree Collapse file tree 4 files changed +18
-20
lines changed
Expand file tree Collapse file tree 4 files changed +18
-20
lines changed Original file line number Diff line number Diff line change 3131 "@octokit/request" : " ^9.1.1" ,
3232 "@octokit/request-error" : " ^6.1.1" ,
3333 "@octokit/types" : " ^13.4.1" ,
34- "lru -cache" : " npm:@wolfy1339/lru-cache@^11.0.2-patch.1 " ,
34+ "toad -cache" : " ^3.7.0 " ,
3535 "universal-github-app-jwt" : " ^2.2.0" ,
3636 "universal-user-agent" : " ^7.0.0"
3737 },
Original file line number Diff line number Diff line change 1- // https://github.com/isaacs/node-lru-cache#readme
2- import { LRUCache } from "lru-cache" ;
1+ import { Lru } from "toad-cache" ;
32
43/* v8 ignore next */
54import type {
@@ -12,12 +11,12 @@ import type {
1211} from "./types.js" ;
1312
1413export function getCache ( ) {
15- return new LRUCache < number , string > ( {
14+ return new Lru < string > (
1615 // cache max. 15000 tokens, that will use less than 10mb memory
17- max : 15000 ,
16+ 15000 ,
1817 // Cache for 1 minute less than GitHub expiry
19- ttl : 1000 * 60 * 59 ,
20- } ) ;
18+ 1000 * 60 * 59 ,
19+ ) ;
2120}
2221
2322export async function get (
Original file line number Diff line number Diff line change 11import type * as OctokitTypes from "@octokit/types" ;
2- import type { LRUCache } from "lru -cache" ;
2+ import type { Lru } from "toad -cache" ;
33import type * as OAuthAppAuth from "@octokit/auth-oauth-app" ;
44
55// STRATEGY OPTIONS
@@ -134,7 +134,7 @@ export type Route = OctokitTypes.Route;
134134export type RequestInterface = OctokitTypes . RequestInterface ;
135135
136136export type Cache =
137- | LRUCache < string , string >
137+ | Lru < string >
138138 | {
139139 get : ( key : string ) => string | Promise < string > ;
140140 set : ( key : string , value : string ) => any ;
You can’t perform that action at this time.
0 commit comments