Scroll and cache

Hello,

How can I get the calendar to make a GET request on each click of a scroll button?

So… I load the calendar, all good. I click on a scroll button, it scrolls for 22 days (as it should) after making a GET request to /data. If I click on “previous” button, it doesn’t make another GET request. I know it caches results so it’s faster and everything, but I need it to make that request as I’m updating the sections as well. So if on the initial load I have 10 resources and if I click on next I get 2 resources, if I go back it doesn’t refresh the sections and it remains with 2 resources.

Thank you!

Hi,

Please, use prevent_cache config to enable cathing of GET request.

Thank you for the reply!
I already used that.

This is my config:

// Scheduler config scheduler.config.container_autoresize = true; scheduler.config.xml_date = "%Y-%m-%d %H:%i"; scheduler.config.load_date = "%Y-%m-%d"; scheduler.config.multisection = true; scheduler.locale.labels.timeline_tab = "Month"; scheduler.locale.labels.unit_tab = "Day"; scheduler.config.details_on_create = true; scheduler.config.details_on_dblclick = true; scheduler.config.select = false; scheduler.config.scroll_hour = 8; scheduler.config.time_step = 60; scheduler.config.use_select_menu_space = false; scheduler.config.all_timed = true; scheduler.config.full_day = false; scheduler.config.server_utc = true; scheduler.config.show_loading = true; scheduler.config.prevent_cache = true; scheduler.config.delay_render = 300;

I found this on documentation of “setLoadMode”:
http://disq.us/p/1hujsda

I think this is what I need, but it doesn’t work for me.

This is how I init the calendar:

[code]scheduler.attachEvent("onBeforeViewChange", function(old_mode,old_date,mode,date){
    if(mode != old_mode || (!old_date || old_date.valueOf() != date.valueOf())){
        // clear scheduler each time date changed in order to prevent dyn loading cache
        scheduler.clearAll();
    }
    return true;
});

// Each time the events are loaded on the calendar we check for collisions
scheduler.attachEvent(“onXLE”, check_colisions);
scheduler.init(‘scheduler_here’, cal_start_date, calendar_view);
scheduler.setLoadMode(“month”);
scheduler.load(“calendar/data”, “json”);[/code]