Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • KavenCache

Index

Constructors

constructor

Accessors

Static SHA3

  • Returns KavenSHA3

Methods

Static GenerateYearMonthId

  • GenerateYearMonthId(randomLength?: number, validFunc?: (id: string) => boolean, ignoreIDs?: string[], candidatesGUID?: string): string
  • just for backward-compatible with earlier versions, recommend use GenerateYearMonthIdAsync instead

    deprecated
    since

    1.0.1

    version

    2021-12-07

    example

    Parameters

    • randomLength: number = 4
    • Optional validFunc: (id: string) => boolean
        • (id: string): boolean
        • Parameters

          • id: string

          Returns boolean

    • Optional ignoreIDs: string[]
    • Optional candidatesGUID: string

    Returns string

Static GenerateYearMonthIdAsync

  • GenerateYearMonthIdAsync(randomLength?: number, validFunc?: (id: string) => Promise<boolean>, ignoreIDs?: string[], candidatesGUID?: string): Promise<string>
  • since

    1.0.5

    version

    2021-12-07

    Parameters

    • randomLength: number = 4
    • Optional validFunc: (id: string) => Promise<boolean>
        • (id: string): Promise<boolean>
        • Parameters

          • id: string

          Returns Promise<boolean>

    • Optional ignoreIDs: string[]
    • Optional candidatesGUID: string

    Returns Promise<string>

Static GetCache

  • GetCache<T>(name: string): undefined | T
  • since

    1.0.5

    version

    2021-12-07

    Type parameters

    • T

    Parameters

    • name: string

    Returns undefined | T

Static GetValue

  • GetValue<T>(name: string, defaultValueIfNotExist?: T): undefined | T
  • version

    1.0.0

    since

    1.0.5

    Type parameters

    • T

    Parameters

    • name: string
    • Optional defaultValueIfNotExist: T

    Returns undefined | T

Static RemoveCache

  • RemoveCache(name?: string, removeExpired?: boolean): void
  • since

    1.0.5

    version

    2021-12-07

    Parameters

    • Optional name: string
    • removeExpired: boolean = true

    Returns void

Static RemoveValue

  • RemoveValue(name: string): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string

    Returns void

Static SetCacheWithDate

  • SetCacheWithDate(name: string, value: any, absoluteExpiration: Date): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string
    • value: any
    • absoluteExpiration: Date

    Returns void

Static SetCacheWithHour

  • SetCacheWithHour(name: string, value: any, hour: number): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string
    • value: any
    • hour: number

    Returns void

Static SetCacheWithMilliseconds

  • SetCacheWithMilliseconds(name: string, value: any, millisecond: number): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string
    • value: any
    • millisecond: number

    Returns void

Static SetCacheWithMinute

  • SetCacheWithMinute(name: string, value: any, minute: number): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string
    • value: any
    • minute: number

    Returns void

Static SetValue

  • SetValue(name: string, value: any): void
  • version

    1.0.0

    since

    1.0.5

    Parameters

    • name: string
    • value: any

    Returns void

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Class with type parameter
  • Constructor
  • Interface
  • Interface with type parameter
  • Enumeration
  • Static method

Generated using TypeDoc