You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be it possible to add save/load response feature? That could serve as caching system -for testing projects that needs a few (or way more) fetches, eventually to manually change data to test edge cases ("what my script will do if this field won't be filled on WD"). And even better for public scripts, with a lot of hits where author could easily cache data for certain time.
I imagine it something like:
if (file_exists('cache.txt') $wikidata->loadString(file_get_contents('cache.txt')); // and loadFile('cache.txt')? That would be radelse { $wikidata->get('Q12345'); file_put_contents('cache.txt', $wikidata->rawResponse); }
So an additional property, which is filled upon get() method and can be populated with loadString() method (and then processed, as it would be response from curl). Optionally (because one can keep track of it by oneself, not relying on class), a property source to display curl, string or file (in case f proposed loadFile())
The text was updated successfully, but these errors were encountered:
Would be it possible to add save/load response feature? That could serve as caching system -for testing projects that needs a few (or way more) fetches, eventually to manually change data to test edge cases ("what my script will do if this field won't be filled on WD"). And even better for public scripts, with a lot of hits where author could easily cache data for certain time.
I imagine it something like:
So an additional property, which is filled upon
get()
method and can be populated withloadString()
method (and then processed, as it would be response from curl). Optionally (because one can keep track of it by oneself, not relying on class), a propertysource
to display curl, string or file (in case f proposedloadFile()
)The text was updated successfully, but these errors were encountered: