Created
April 30, 2023 23:06
-
-
Save christopherbauer/b2d5bc902a41d54da8f72256f611c8d1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { DataAccessLayer } from "./DataAccessLayer"; | |
import { Service } from "./Service"; | |
import { CacheEject, CacheFlush, CacheKeys } from "./cached"; | |
const service = new Service(new DataAccessLayer()); | |
const id1 = service.register({ firstName: "Chris", lastName: "Bauer" }); | |
const id2 = service.register({ firstName: "John", lastName: "Tomson" }); | |
const id3 = service.register({ firstName: "Tom", lastName: "Johnson" }); | |
let tries = 0; | |
const getAllUsersInfo = () => { | |
tries++; | |
console.log(`/***************************************************`); | |
console.log(`** Execution: ${tries}`); | |
console.log(`***************************************************/`); | |
console.log(service.getUserInfo(id1)); | |
console.log(service.getUserInfo(id2)); | |
console.log(service.getUserInfo(id3)); | |
}; | |
getAllUsersInfo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment