Compare commits
1 Commits
main
...
cache-draf
Author | SHA1 | Date |
---|---|---|
b1ek | 10827918f9 |
|
@ -0,0 +1,21 @@
|
||||||
|
import { Injectable } from "@nestjs/common";
|
||||||
|
import { Indexes } from "../indexes.js";
|
||||||
|
import { GetOperationResult } from "../providers/abstract.provider.js";
|
||||||
|
|
||||||
|
export type CacheRowData = Indexes | GetOperationResult;
|
||||||
|
class CacheRow {
|
||||||
|
data: CacheRowData;
|
||||||
|
expires: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
const cache = [] as CacheRow[];
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class KeysCacheProvider {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
put(data: CacheRowData) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,9 +3,10 @@ import { HKPController } from './controllers/hkp.controller.js'
|
||||||
import { OpenPGPKeysProvider } from './providers/openpgp.provider.js'
|
import { OpenPGPKeysProvider } from './providers/openpgp.provider.js'
|
||||||
import { AllKeysProvider } from './providers/all.provider.js'
|
import { AllKeysProvider } from './providers/all.provider.js'
|
||||||
import { UbuntuKeysProvider } from './providers/ubuntu.provider.js'
|
import { UbuntuKeysProvider } from './providers/ubuntu.provider.js'
|
||||||
|
import { KeysCacheProvider } from './cache/cache.provider.js'
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
providers: [OpenPGPKeysProvider, UbuntuKeysProvider, AllKeysProvider],
|
providers: [OpenPGPKeysProvider, UbuntuKeysProvider, AllKeysProvider, KeysCacheProvider],
|
||||||
controllers: [HKPController],
|
controllers: [HKPController],
|
||||||
exports: [OpenPGPKeysProvider, UbuntuKeysProvider, AllKeysProvider],
|
exports: [OpenPGPKeysProvider, UbuntuKeysProvider, AllKeysProvider],
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue