diff --git a/docs/cache.md b/docs/cache.md new file mode 100644 index 0000000..1f3d6bd --- /dev/null +++ b/docs/cache.md @@ -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/ +``` + +```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% + +```