Fixed locals.cache when NODE_ENV==='production'