jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Using cache:false is ignored causing _=1582749028718 to be appended to URL.

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 5 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • dacracot
    Participant

    I’m configuring a tree grid and using data generated by a service that can not tolerate the _=1582749028718 that jQuery ajax calls appends to prevent IE from caching. I added the cache:false to my source, but it continues to be appended.

    My code…

    
    // --------------------------------------
    var dataDefinition =
    	{
    	dataType: "json",
    	dataFields: SCL.dataColumns,
    	hierarchy: {
    		root: "children"
    		},
    	timeout: 10000,
    	root: "SCL",
    	url: "http://localhost:8080/pooka/scl/data.json",
    	cache: false,
    	id: "id"
     };
    // --------------------------------------
    var dataAdapter = new $.jqx.dataAdapter(dataDefinition, {
    	loadComplete: function(){
    	}
    });
    // --------------------------------------
    $("#scl-grid").jqxTreeGrid({
    	source: dataAdapter,
    	pageable: true,
    	pagerMode: 'advanced',
    	filterable: true,
    	filterMode: 'simple',
    	sortable: true,
    	altRows: true,
    	columnsResize: true,
    	ready: function(){
    		$("#scl-grid").jqxTreeGrid('expandRow', '111100001'); 
    		$("#scl-grid").jqxTreeGrid('expandRow', '111100007');
    		},
    	columns: SCL.tableColumns,
    	columnGroups: SCL.groupColumns
    });
    // --------------------------------------
    

    Where can I set cache to false to stop the appended parameter?


    Peter Stoev
    Keymaster

    Hi dacracot,

    cache: false is actually the default value. I think you should set it to cache: true in your case.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com


    dacracot
    Participant

    No change. The “_=1582903579291” is still appended to the URL.

    Is the cache:true|false in the correct place? I could not find where it should be located in the API documentation.


    Peter Stoev
    Keymaster

    Hi dacracot,

    When the cache is set to true, this should not be appended to the url. Alternative, you can use the default JavaScript API to make the AJAX call and just use the adapter to load the result.

    Regards,
    Peter

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

You must be logged in to reply to this topic.