-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Cache #11
Comments
Make sure you have the latest version of data-store, and use the API (call Also note that there have been some changes to internals in 2.0. It sounds like you were using private properties, there is no longer a edit: @doowb changed to 2.0 (this is published to npm but currently still in the |
Thanks, im going to update data-store and see if works. Im using gists to download a json and set that download json to the .json file of data-store, my problem was that when i update the json, the "data" doesn't get updated until i restart my app. Let's see if updating helps. |
I am calling gists.download({id: 'ID of gist'}, function(err, res) {
let finalconte = JSON.parse(conte);
baseDatos = finalconte.files['abc.json'].content
store.load(baseDatos);
}); This code is not loading the content of the gist to the store, and I don't know why. |
@plopez01 store.load();
store.set(baseDatos); If you want to completely overwrite the file with the new data, then you can do this: // this will overwrite the entire object, then save it to the file.
store.data = baseDatos; |
you don't need to call edit: doh! I just realized that I hadn't published version 3.0! I was obviously confused, and I'm sure I confused you guys as well. Apologies! @plopez01 try again with 3.0 and let me know if you have any issues. thanks! |
Well thanks a lot! |
Please, it would be great to be possible to re-load the cache, or set it to something, becouse i edit the json file and the cache doesn't get updated.
The text was updated successfully, but these errors were encountered: