realty-investor-timeline

@cubedelement.com/realty-investor-timeline


@cubedelement.com/realty-investor-timeline / caching/value-cache / ValueCache

Class: ValueCache<T>

Defined in: caching/value-cache.ts:34

Type Parameters

T

Implements

Constructors

new ValueCache()

new ValueCache<T>(expireDate, defaultValue, renewalInMonths): ValueCache<T>

Defined in: caching/value-cache.ts:56

Parameters

expireDate

Date

defaultValue

T[]

renewalInMonths

number

Returns

ValueCache<T>

Properties

_value

protected _value: T[]

Defined in: caching/value-cache.ts:106


renewalInMonths

renewalInMonths: number

Defined in: caching/value-cache.ts:35

Implementation of

IValueCache.renewalInMonths

Accessors

expireDate

Get Signature

get expireDate(): Date

Defined in: caching/value-cache.ts:37

Returns

Date

Set Signature

set expireDate(value): void

Defined in: caching/value-cache.ts:41

Parameters
value

Date

Returns

void

Implementation of

IValueCache.expireDate


newDefault

Get Signature

get newDefault(): T[]

Defined in: caching/value-cache.ts:48

Returns

T[]

Implementation of

IValueCache.newDefault

Methods

getValue()

getValue(currentTime): T[]

Defined in: caching/value-cache.ts:76

if the cache is expired, then it will return the default value. otherwise it will return the stored value

Parameters

currentTime

Date

Returns

T[]

Implementation of

IValueCache.getValue


isCacheExpired()

isCacheExpired(currentDate?): boolean

Defined in: caching/value-cache.ts:94

determines if the expiredDate is greater than or equal to currentDate. if this is the case it will be return true. Also if expiredDate is nothing, then it will return true. Also if currentDate is null, while expiredDate exists then it will be expired, aka true

Parameters

currentDate?

Date

Returns

boolean

Implementation of

IValueCache.isCacheExpired


setValue()

setValue(value, currentDate): void

Defined in: caching/value-cache.ts:63

Parameters

value

T[]

currentDate

Date

Returns

void

Implementation of

IValueCache.setValue