mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-13 17:20:11 +00:00
Move anti-caching parameter to load function
For less repetition and shorter paths in the higher level functions. Active by default, but can be disabled.
This commit is contained in:
@@ -38,7 +38,10 @@ function parseCSV(str) {
|
||||
}
|
||||
|
||||
// Load file
|
||||
async function readFile(filePath, json = false) {
|
||||
async function readFile(filePath, json = false, cache = false) {
|
||||
if (!cache)
|
||||
filePath += `?${new Date().getTime()}`;
|
||||
|
||||
let response = await fetch(`file=${filePath}`);
|
||||
|
||||
if (response.status != 200) {
|
||||
|
||||
Reference in New Issue
Block a user