added directory listing cache
This commit is contained in:
parent
a069baf48d
commit
4499e88245
5 changed files with 59 additions and 8 deletions
|
|
@ -67,10 +67,10 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
if !d.IsDir() {
|
||||
if option == "p" || option == "sp" {
|
||||
if option == "p" || option == "s" {
|
||||
if option == "p" {
|
||||
fs.fs.Preload(p)
|
||||
} else {
|
||||
} else if option == "s" {
|
||||
fs.fs.CancelPreload(p)
|
||||
}
|
||||
rdir := "/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue