We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
versioned caching is broken
On [this line](https://github.com/ocf/ocfweb/blob/e0ca5b9053abf4908fd6dd3ff344724e61c38b53/ocfweb/environment.py#L15) we use a marathon environment variable to determine the cache version. We need to change this to use a Kubernetes things, a la 
https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ocfweb/environment.py`
Content:
```
1 """Introspection into the current environment."""
2 import os
3 from functools import lru_cache
4 
5 
6 @lru_cache()
7 def ocfweb_version():
8     """Return string representing ocfweb version.
9 
10     In dev, returns 'dev'. In prod, returns a version
11     similar to '2015.12.06.02.25-gitb98c8cb6'.
12     """
13     # On Marathon, read it out of environ
14     try:
15         docker_image, tag = os.environ['MARATHON_APP_DOCKER_IMAGE'].split(':', 1)
16         return tag
17     except KeyError:
18         pass
19 
20     # Otherwise, we must be in dev.
21     return 'dev'
22
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/ocfweb/environment.py b/ocfweb/environment.py
--- a/ocfweb/environment.py
+++ b/ocfweb/environment.py
@@ -8,12 +8,11 @@
     """Return string representing ocfweb version.
 
     In dev, returns 'dev'. In prod, returns a version
-    similar to '2015.12.06.02.25-gitb98c8cb6'.
+    similar to '2019-08-20-T21-10-57-gite0ca5b9'.
     """
-    # On Marathon, read it out of environ
+    # On Kubernetes, read it out of environ
     try:
-        docker_image, tag = os.environ['MARATHON_APP_DOCKER_IMAGE'].split(':', 1)
-        return tag
+        return os.environ['OCFWEB_PROD_VERSION']
     except KeyError:
         pass

{"golden_diff": "diff --git a/ocfweb/environment.py b/ocfweb/environment.py\n--- a/ocfweb/environment.py\n+++ b/ocfweb/environment.py\n@@ -8,12 +8,11 @@\n     \"\"\"Return string representing ocfweb version.\n \n     In dev, returns 'dev'. In prod, returns a version\n-    similar to '2015.12.06.02.25-gitb98c8cb6'.\n+    similar to '2019-08-20-T21-10-57-gite0ca5b9'.\n     \"\"\"\n-    # On Marathon, read it out of environ\n+    # On Kubernetes, read it out of environ\n     try:\n-        docker_image, tag = os.environ['MARATHON_APP_DOCKER_IMAGE'].split(':', 1)\n-        return tag\n+        return os.environ['OCFWEB_PROD_VERSION']\n     except KeyError:\n         pass\n", "issue": "versioned caching is broken\nOn [this line](https://github.com/ocf/ocfweb/blob/e0ca5b9053abf4908fd6dd3ff344724e61c38b53/ocfweb/environment.py#L15) we use a marathon environment variable to determine the cache version. We need to change this to use a Kubernetes things, a la \r\nhttps://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/.\n", "before_files": [{"content": "\"\"\"Introspection into the current environment.\"\"\"\nimport os\nfrom functools import lru_cache\n\n\n@lru_cache()\ndef ocfweb_version():\n    \"\"\"Return string representing ocfweb version.\n\n    In dev, returns 'dev'. In prod, returns a version\n    similar to '2015.12.06.02.25-gitb98c8cb6'.\n    \"\"\"\n    # On Marathon, read it out of environ\n    try:\n        docker_image, tag = os.environ['MARATHON_APP_DOCKER_IMAGE'].split(':', 1)\n        return tag\n    except KeyError:\n        pass\n\n    # Otherwise, we must be in dev.\n    return 'dev'\n", "path": "ocfweb/environment.py"}], "after_files": [{"content": "\"\"\"Introspection into the current environment.\"\"\"\nimport os\nfrom functools import lru_cache\n\n\n@lru_cache()\ndef ocfweb_version():\n    \"\"\"Return string representing ocfweb version.\n\n    In dev, returns 'dev'. In prod, returns a version\n    similar to '2019-08-20-T21-10-57-gite0ca5b9'.\n    \"\"\"\n    # On Kubernetes, read it out of environ\n    try:\n        return os.environ['OCFWEB_PROD_VERSION']\n    except KeyError:\n        pass\n\n    # Otherwise, we must be in dev.\n    return 'dev'\n", "path": "ocfweb/environment.py"}]}