I am using `mongoDB` to store a collection of polygons and use `$geoIntersects` queries to find in which polygon a specific point is.

My `mongoose` `Schema` looks like this:

```
var LocationShema = mongoose.Schema({
    name: String,
    geo: {
        type: {
            type: String 
        },
        coordinates: []
    }
});

LocationShema.index({geo: '2dsphere'});

module.exports = mongoose.model('Location', LocationShema);

```

So, each element is a polygon. I added the `2dsphere` index hoping that the queries would be faster and the entire collection would be stored in memory. Unfortunately it takes about `600ms` for ~20queries which is way too much for my use case.

My queries look like this:

```
Location.find({
            geo: {
                $geoIntersects: {
                    $geometry: {
                        type: 'Point',
                        coordinates: [pos.lng, pos.lat]
                    }
                }
            }
 },...)

```

Is there anyway I can make this run faster? Can I force MongoDB to cache the entire collection in the database (as ther collection never changes). Is there any way I can **check if the collection is actually stored in an in-memory cache**?

Also, are there any alternatives I can use (eg: a library or something) that allows for fast geo-spatial queries?