Skip to content

Commit

Permalink
Cache a few queries for 1h
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacroldan committed Feb 3, 2025
1 parent 445c14a commit 4c78d0d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class AppManagementClient implements DeveloperPlatformClient {

const {appToken, userId, businessPlatformToken} = await ensureAuthenticatedAppManagementAndBusinessPlatform()
this._businessPlatformToken = businessPlatformToken
const userAccount = await businessPlatformRequestDoc(UserInfo, businessPlatformToken)
const userAccount = await businessPlatformRequestDoc(UserInfo, businessPlatformToken, undefined, '1h')

if (userAccount.currentUserAccount) {
this._session = {
Expand Down Expand Up @@ -272,6 +272,7 @@ export class AppManagementClient implements DeveloperPlatformClient {
FindOrganizations,
await this.businessPlatformToken(),
variables,
'1h',
)
const org = organizationResult.currentUserAccount?.organization
if (!org) {
Expand Down Expand Up @@ -324,7 +325,7 @@ export class AppManagementClient implements DeveloperPlatformClient {

async specifications({organizationId}: MinimalAppIdentifiers): Promise<RemoteSpecification[]> {
const query = FetchSpecifications
const result = await appManagementRequestDoc(organizationId, query, await this.token())
const result = await appManagementRequestDoc(organizationId, query, await this.token(), undefined, '1h')
return result.specifications.map(
(spec): RemoteSpecification => ({
name: spec.name,
Expand Down

0 comments on commit 4c78d0d

Please sign in to comment.