Members
-
<constant> sqlite3
-
Caching module using sqlite
Methods
-
ClearCache()
-
Clear out expired entries from our cache
-
GetGlobal(key)
-
Get a globally cached value This is identical to Get, but the requested key will be in scope of the entire library, not just the park that requests the data
Parameters:
Name Type Description keyString Key to request associated data for Returns:
Returns Promise with data (or null if not cached)- Type
- Promise.<Object>
-
SetGlobal(key, data [, ttl])
-
Set a cached value library-wide Idential to Set, but cached at a library level instead of for the owning park
Parameters:
Name Type Argument Description keyString Key to set data for dataObject Data to store in cache ttlNumber | function <optional>
Time this data should be cached for (in seconds) Returns:
Returns Promise resolving if cached data was successfully set- Type
- Promise
-
SetupDB()
-
Setup database tables
-
UpgradeDB()
-
Upgrade our cache database
Type Definitions
-
RideData
-
Type:
- Object
Properties:
Name Type Description idString Unique Ride ID nameString The ride's name activeBool Is this ride currently operating? wait_timeNumber Ride's current queue time last_updateNumber Last time this Ride has a wait time change (in milliseconds) -
ScheduleData
-
Type:
- Object
Properties:
Name Type Description dateMoment Date this schedule data applies to openingTimeMoment Opening time for this date closingTimeMoment Closing time for this date typeString Whether this schedule data refers to an "Operating", "Closed" or "Refurbishment" status specialArray.<SpecialScheduleData> Won't exist if no special times exist for this date -
SpecialScheduleData
-
Type:
- Object
Properties:
Name Type Description openingTimeMoment Opening time for this special schedule data closingTimeMoment Closing time for this special schedule data typeString Type of special schedule this is (eg. "Extra Magic Hours")