The syntax would be
```
val store = level match {
  case _ if level.useMemory => memoryStore
  case _ if level.useTachyon => getTachyonStore()
  case _ => diskStore
} 
store.putBytes(xxx)
```

I think the main improvement is adding the "store" intermediate value, but either way.