Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 Support (Qt 5) › cache is undefined

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #22076

    Berka Frenfert

    I used same basic project Todo for learning but when i changed the url to get my documents

    I always get the cache undefined

    How do i tell storage that this time you are not getting Todo list rather Docs List will be used.

    Or please just explain what other than storage should be changed in Todo project when url is changed.

    here is the connections from DataModel

    Connections {
            id: logicConnection
            // action 1 - fetchTodos
            onFetchTodos: {
                // check cached value first
                ///YIB fucking code
                //var cached = cache.getValue("docs")
                var cached = cache.getValue("docs")
                    _.todos = cached
                // load from api
                            function(data) {
                                // cache data before updating model property
                                /// YIB
                                _.todos = data
                            function(error) {
                                // action failed if no cached data

    documentation does not explain that or if it does i could not find the detail So please consider this support the last place for help.

    waiting days for answer is certainly not right selection of software.


    Felgo Team


    with only that bit of code, it is hard to see what is going on. Also what do you mean with it being undefined? Is there no value set or is it actually and error that says “cache is undefined”? If the value is just empty, this will be due to the initialization code in the main file, which clears the cache if the app has internet access (and is therefore about to fetch the latest data):

    Component.onCompleted: {
        // if device has network connection, clear cache at startup
        // you'll probably implement a more intelligent cache cleanup for your app
        // e.g. to only clear the items that aren't required regularly
        if(isOnline) {
        // fetch todo list data


Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded