Home Reference Source Repository
public class | source

CacheValidator

You can directly use instance of this class. cacheValidator

CacheValidator class, methods here check for the validity of the cache. These methods should return false if the cache is invalid.

Static Method Summary

Static Public Methods
public static

cacheIsFresh(timestamp: number): boolean

public static

noNewCommits(timestamp: number): boolean

Static Public Methods

public static cacheIsFresh(timestamp: number): boolean source

Params:

NameTypeAttributeDescription
timestamp number

lastViewed timestamp

Return:

boolean

true if cache is stale and should be busted

public static noNewCommits(timestamp: number): boolean source

Params:

NameTypeAttributeDescription
timestamp number

lastViewed timestamp

Return:

boolean

true if cache is stale and should be busted