mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 18:51:10 +01:00
added option to disable the cache
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
var defaults = {
|
var defaults = {
|
||||||
maxItems: -1,
|
maxItems: -1,
|
||||||
|
disableCache: false,
|
||||||
paramName: "url",
|
paramName: "url",
|
||||||
itemClass: "feeds",
|
itemClass: "feeds",
|
||||||
errorTitle: "Error",
|
errorTitle: "Error",
|
||||||
@@ -59,9 +60,13 @@
|
|||||||
|
|
||||||
function loadFeeds(){
|
function loadFeeds(){
|
||||||
loadingView();
|
loadingView();
|
||||||
|
var feedUrl = url;
|
||||||
|
if ( options.disableCache ){
|
||||||
|
feedUrl += "?_dc=" + new Date().getTime();
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url,
|
url: feedUrl,
|
||||||
dataType: "xml",
|
dataType: "xml",
|
||||||
success: renderFeeds,
|
success: renderFeeds,
|
||||||
failure: renderErrorMsg
|
failure: renderErrorMsg
|
||||||
|
|||||||
Reference in New Issue
Block a user