diff options
| author | Chris Lu <chris.lu@gmail.com> | 2016-11-16 07:09:57 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2016-11-16 07:09:57 -0800 |
| commit | dcaf1796fe0e41e39ac5c9602cb190cf150e7849 (patch) | |
| tree | e437a5a9c6eee42be162d329adefb5c57c347a4a /weed/server/volume_server.go | |
| parent | f54f530ada119f9bfe45d087c5474a2c70e2b9a1 (diff) | |
| download | seaweedfs-dcaf1796fe0e41e39ac5c9602cb190cf150e7849.tar.xz seaweedfs-dcaf1796fe0e41e39ac5c9602cb190cf150e7849.zip | |
add option to enable caching
Diffstat (limited to 'weed/server/volume_server.go')
| -rw-r--r-- | weed/server/volume_server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 79a4276b1..1a912a169 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -33,7 +33,8 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, dataCenter string, rack string, whiteList []string, fixJpgOrientation bool, - readRedirect bool) *VolumeServer { + readRedirect bool, + enableBytesCache bool) *VolumeServer { vs := &VolumeServer{ pulseSeconds: pulseSeconds, dataCenter: dataCenter, @@ -44,6 +45,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, } vs.SetMasterNode(masterNode) vs.store = storage.NewStore(port, ip, publicUrl, folders, maxCounts, vs.needleMapKind) + storage.EnableBytesCache = enableBytesCache vs.guard = security.NewGuard(whiteList, "") |
