cubehouse / themeparks

Unofficial API for accessing ride wait times and schedules for Disneyland, Disney World, Universal Studios, and many more parks
MIT License
543 stars 126 forks source link

Can't delete parks cache #253

Closed maxiostro closed 4 years ago

maxiostro commented 4 years ago

According to the docs, there is a global ClearCache method (this link), but that doesn't work. Here, all my "tests".

const tps = require("themeparks");
tps.ClearCache(); //Doesn't exist
var a = new tps.Parks.UniversalStudiosFlorida();
a.ClearCache() //Doesn't exist either
a.Cache; //It exist, but I don't know what to do with that.
a.Cache.ClearCache(); //Doesn't work either.
cubehouse commented 4 years ago

This is a confusingly named function, but the description on the docs explains it better as it clears out invalid cache entries that have passed their expire date - this is called by the Cache library and does not need to be called manually.

Think this is a JSDoc quirk where the function isn't in a class so it ends up in the "global" scope, which isn't something you would have access to from one JS module to another.