add config option for FileServer#nocache

This commit is contained in:
Daniella 2022-07-07 14:03:05 +02:00
parent 5775f625c9
commit 1228c17d0c

View file

@ -9,6 +9,7 @@ import de.tudbut.async.Callback;
import de.tudbut.async.ComposeCallback; import de.tudbut.async.ComposeCallback;
import de.tudbut.async.TaskCallable; import de.tudbut.async.TaskCallable;
import de.tudbut.tryumph.config.IRequestCatcher; import de.tudbut.tryumph.config.IRequestCatcher;
import de.tudbut.tryumph.config.TryConfig;
import de.tudbut.tryumph.events.GET; import de.tudbut.tryumph.events.GET;
import de.tudbut.tryumph.events.Path; import de.tudbut.tryumph.events.Path;
import de.tudbut.tryumph.events.RequestHandler; import de.tudbut.tryumph.events.RequestHandler;
@ -23,6 +24,11 @@ public class FileServer implements IRequestCatcher, RequestHandler.Listener {
public FileServer(TCN data) { public FileServer(TCN data) {
this.data = data; this.data = data;
if(data.getBoolean("nocache") != null) {
if(data.getBoolean("nocache")) {
TryConfig.nocache = true;
}
}
} }
@Override @Override