Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CachedData

Cached data response.

This will be returned by most methods of CacheStore.

Keep in mind that it does not have to be cached data, since it can also contain newly fetched data. In that case, fromCache will be false.

Hierarchy

  • CachedData

Index

Properties

data?: AnyObject

Contains the data if it has successfully been fetched.

fromCache?: boolean

True if the data comes from cache, false if the data is newly fetched.

savedOn?: string | Date

Contains the date on which the cache is saved, if the cache is new.

Make sure you always create a new Date object with this value as the parameter. It doesn't necessarily have to be a Date object, it can also be a string that is recognised by Date.parse().

success: boolean

True if the fresh data or cache is successfully fetched.

Generated using TypeDoc