added local settings file and wrapped settings for memcache in an environment check