File

src/app/modules/shared/services/browser-cache-ttl/browser-cache-ttl.service.ts

Description

Service to fetch user details from server

Constructor

constructor()

Properties

Private _browserCacheTtl
_browserCacheTtl: string
Default value: 600

Contains user id

browserCacheTtl
browserCacheTtl: number

get method to fetch browserCacheTtl.

import { Injectable } from '@angular/core';
import { ConfigService, ServerResponse, IUserProfile, IUserData, IAppIdEnv } from '@sunbird/shared';
import { HttpClient } from '@angular/common/http';
/**
 * Service to fetch user details from server
 *
 */
@Injectable()
export class BrowserCacheTtlService {
  /**
   * Contains user id
   */
  private _browserCacheTtl = '600';
  constructor() {
    try {
      this._browserCacheTtl = (<HTMLInputElement>document.getElementById('apiCacheTtl')).value;
    } catch (error) {
    }

  }

  /**
   * get method to fetch browserCacheTtl.
   */
  get browserCacheTtl(): number {
    return Number(this._browserCacheTtl);
  }

}

results matching ""

    No results matching ""