* [misc] check clientCache config before request.
This commit is contained in:
+1
-2
@@ -497,8 +497,7 @@
|
||||
const headers = {'X-ZIN-Options': JSON.stringify($.extend({selector: selectors, type: 'list'}, options.zinOptions)), 'X-ZIN-App': currentCode, 'X-Zin-Cache-Time': 0};
|
||||
if(options.modal) headers['X-Zui-Modal'] = 'true';
|
||||
const requestMethod = (options.method || 'GET').toUpperCase();
|
||||
if(!options.cache && options.cache !== false) options.cache = requestMethod === 'GET' ? (url + (url.includes('?') ? '&zin=' : '?zin=') + encodeURIComponent(selectors.join(','))) : false;
|
||||
options.cache = false; // Disable local cache for 20.1.
|
||||
if(!options.cache && options.cache !== false) options.cache = (requestMethod === 'GET' && config.clientCache) ? (url + (url.includes('?') ? '&zin=' : '?zin=') + encodeURIComponent(selectors.join(','))) : false;
|
||||
const cacheKey = options.cache;
|
||||
let cache;
|
||||
const renderPageData = (data, onlyZinDebug) =>
|
||||
|
||||
Reference in New Issue
Block a user