Added the ability to disable caching when in the local evironment.