# nginx and memcached

## Kenji Miyamoto

In order to make my webserver more robust, I want to add memcached into the mix.  So far, I have these new lines in my nginx.conf:

```
                location / {

                        set $memcached_key $uri;

                        memcached_pass 127.0.0.1:9252;

                        default_type text/xhtml;

                        error_page 404 = @fallback;

                }
```

nginx doesn't appear to put stuff into memcached, only try to get stuff out (and cause a cache miss).  Can nginx populate the cache?

----------

