Skip to content

Commit

Permalink
rename shouldEnableCache to useCache
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Jan 21, 2024
1 parent 434d7f7 commit 5f3baff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/handlers/request_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ export class RequestHandler extends RequestHandlerHelper {
}

private executeWallIncoming_(): Promise<IHttpResult> {
const wallLength = FORT_GLOBAL.walls.length;
const walls = FORT_GLOBAL.walls;
const wallLength = walls.length;
if (wallLength === 0) return;
return promise((res, rej) => {
let index = 0;
const executeWallIncomingByIndex = () => {
if (wallLength > index) {
const wall = FORT_GLOBAL.walls[index++];
const wall = walls[index++];
const constructorArgsValues = InjectorHandler.getConstructorValues(wall.name);
const wallObj = new wall(...constructorArgsValues);
wallObj['componentProp_'] = this.componentProps;
Expand Down
2 changes: 1 addition & 1 deletion src/models/fort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class Fort {

static scheduler = new TaskSchedulerManager();

static set shouldEnableCache(value: boolean) {
static set useCache(value: boolean) {
FORT_GLOBAL.shouldEnableCache = value
}
}
2 changes: 1 addition & 1 deletion tests/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const initServer = async () => {
name: "Counter"
});
Fort.scheduler.startAll();
Fort.shouldEnableCache = true;
Fort.useCache = true;
await Fort.create();
};

Expand Down

0 comments on commit 5f3baff

Please sign in to comment.