last week the pull request changing apipie confuguration for development
mode was merged.
This is only related to development env.
This change affect where the API description is taken from before it is
sent to client (CLI, apipie_bindings)
BEFORE the change the description was always generated from the API
controller on the fly.
AFTER the change the server first looks for pre-generated API
description in public/apipie-cache/ (same as in production env). Just
when the cache is not found the description is generated on the fly.
The CLI (Hammer) is much faster when the server is run with the cache.
However, it is recommended to run 'rake apipie:cache' after every API
change (rebases, foreman plugin enabled/disabled, etc) to refresh the cache.
If you don't want to use the cache, just remove the public/apipie-cache
directory.
I was wondering, if we can warn developers when the cache is outdated.
Comparing cache last modified time with latest last modified file from
app/contorllers/api should maybe do the work. And my answer is:
Another point - I noticed that the JSON in the cache directory is over
200k. That is a number if we need this to download every session.
Created new issue - we should use deflate to compress this.
Other than that - good work, I like new bindings. Thanks.
LZ
···
On Mon, Apr 07, 2014 at 01:30:38PM +0200, Martin Bačovský wrote:
> Hi,
>
> last week the pull request changing apipie confuguration for
> development mode was merged.
> This is only related to development env.
> This change affect where the API description is taken from before it
> is sent to client (CLI, apipie_bindings)
>
> BEFORE the change the description was always generated from the API
> controller on the fly.
> AFTER the change the server first looks for pre-generated API
> description in public/apipie-cache/ (same as in production env).
> Just when the cache is not found the description is generated on the
> fly.
>
> The CLI (Hammer) is much faster when the server is run with the
> cache. However, it is recommended to run 'rake apipie:cache' after
> every API change (rebases, foreman plugin enabled/disabled, etc) to
> refresh the cache.
>
> If you don't want to use the cache, just remove the
> public/apipie-cache directory.
>
> Regards,
> Martn
>
> --
> You received this message because you are subscribed to the Google Groups "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.