Skip to content

Commit

Permalink
add docs cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mosoriob committed May 26, 2020
1 parent ac0e163 commit f0d9cea
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Cached

When you run the server, OpenAPI process your specification and this process can be take several minutes for long ontologies. In addition, every restart is going to trigger the process.

Due to the previous errors, the Python server generated by OBA creates a cache file of the specification avoiding to generates if the specification didn't changed.


### Docker

If you are using Docker, please use volumes

```bash
$ docker run -v $PWD/openapi_server/openapi/:/usr/src/app/openapi_server/openapi/ <docker_image>
```

```bash
$ docker run -v $PWD/openapi_server/openapi/:/usr/src/app/openapi_server/openapi/ dbpedia_music
2020-05-23 00:23:54,109 - openapi_server.cached - WARNING - Cache file does not exist: [Errno 2] No such file or directory: '/usr/src/app/openapi_server/openapi/openapi.yaml.cache'
* Serving Flask app "__main__" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
2020-05-23 00:23:54,422 - werkzeug - INFO - * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)

```

```bash
$ docker run -v $PWD/openapi_server/openapi/:/usr/src/app/openapi_server/openapi/ dbpedia_music
* Serving Flask app "__main__" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
2020-05-23 00:24:17,308 - werkzeug - INFO - * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
^C%
```

0 comments on commit f0d9cea

Please sign in to comment.