Question: I have a single Web Role, using MVC5.

In web role properties I selected Enable Caching.

In a controller in my MVC app I have:

```
 var cache = new DataCache("default");

```

But it throws an error:

```
"Server collection cannot be empty"

```

Is the controller the wrong place to create the cache object? I was just trying to put it where I might have used a session cache before.

Answer: 
You should split the query:

```
customer = Customers.objects(id=request.args.get("customer-reservation")).get()
data = Reservations.objects(restaurant=rest, customer=customer).all()

```

Also you will need error handling for any customers that don't match.
You can use in – value is in list (a list of values should be provided) in a single line:

```
data = Reservations.objects(restaurant=rest, 
               customer__in=Customers.objects.filter(id="your filter id")).all()

```