Skip to content

Commit 13f023a

Browse files
committed
build : v1.0.0
1 parent 6695074 commit 13f023a

File tree

80 files changed

+1016
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1016
-0
lines changed

dist/cache-decorator.explore.d.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { OnModuleInit } from "@nestjs/common";
2+
import { DiscoveryService, MetadataScanner, Reflector } from "@nestjs/core";
3+
import { CacheWithStoreName } from "./interfaces/store-name.interface";
4+
/**
5+
* This module is based on the cache aside pattern.
6+
* It does not work on the controller. Please use interception for the controller.
7+
*/
8+
export declare class CacheDecoratorExplore implements OnModuleInit {
9+
private readonly discoveryService;
10+
private readonly metadataScanner;
11+
private readonly reflector;
12+
readonly cache: CacheWithStoreName;
13+
constructor(discoveryService: DiscoveryService, metadataScanner: MetadataScanner, reflector: Reflector, cache: CacheWithStoreName);
14+
/**
15+
* OnModuleInit is a Lifecycle event in NestJS that is invoked when the host module's dependencies are resolved.
16+
* Run this method on the OnModuleInit event.
17+
*
18+
* https://docs.nestjs.com/fundamentals/lifecycle-events#lifecycle-events
19+
*/
20+
onModuleInit(): void;
21+
/**
22+
* Get all singleton instances through getControllers and getProviders.
23+
* Scan the methods of all Provider instances.
24+
* Register caching and cron jobs for methods that use the cache decorator.
25+
*
26+
* @private
27+
*/
28+
explore(): void;
29+
/**
30+
* Find the method used by the cache decorator.
31+
* Then Executed cache aside pattern by method.
32+
*
33+
* @param instance
34+
* @param methodName
35+
*/
36+
registerCacheAndJob(instance: Record<string, Function>, methodName: string): void;
37+
private cacheAside;
38+
registerCron(cron: string, cacheKey: string, job: Function, validate: Function, logger: Function): void;
39+
}
40+
//# sourceMappingURL=cache-decorator.explore.d.ts.map

dist/cache-decorator.explore.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-decorator.explore.js

Lines changed: 140 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-decorator.explore.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-decorator.module.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { CacheModuleAsyncOptions, CacheModuleOptions, DynamicModule } from "@nestjs/common";
2+
/**
3+
* This module is based on the cache aside pattern.
4+
*/
5+
export declare class CacheDecoratorModule {
6+
static register(options: CacheModuleOptions): DynamicModule;
7+
static registerAsync(options: CacheModuleAsyncOptions): DynamicModule;
8+
}
9+
//# sourceMappingURL=cache-decorator.module.d.ts.map

dist/cache-decorator.module.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-decorator.module.js

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-decorator.module.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache.decorator.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { CacheOptions } from "./interfaces";
2+
/**
3+
* Defining Decorator Functions by Local Cache
4+
* @param options
5+
* @constructor
6+
*/
7+
export declare function LocalCache(options?: CacheOptions): MethodDecorator;
8+
/**
9+
* Defining Decorator Functions by Redis Cache
10+
* @param options
11+
* @constructor
12+
*/
13+
export declare function RedisCache(options?: CacheOptions): MethodDecorator;
14+
/**
15+
* Defining Decorator Functions by Redis Cache
16+
* @param options
17+
* @constructor
18+
*/
19+
export declare function HttpCache(options?: CacheOptions): MethodDecorator;
20+
//# sourceMappingURL=cache.decorator.d.ts.map

dist/cache.decorator.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)