Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

add --cached flag to cache API requests #37

Merged
merged 2 commits into from
Feb 19, 2015
Merged

add --cached flag to cache API requests #37

merged 2 commits into from
Feb 19, 2015

Conversation

shawnbot
Copy link
Contributor

This PR adds support for a --cached flag that enables caching of API calls, facilitating a much faster frontend development workflow. You can run it like so:

python __init__.py --cached

I almost put the cache installation code in __init__.py, but ended up moving it to api_caller.py so that all of the request-specific stuff lived there, which makes it simpler to modify how caching is enabled if we were to ever move away from using requests for some reason. Happy to entertain another way of doing this, or to use argparse instead of just sniffing sys.argv.

@theresaanna
Copy link
Contributor

Great call. Thanks! This has been on my never-ending todo list.

theresaanna added a commit that referenced this pull request Feb 19, 2015
add --cached flag to cache API requests
@theresaanna theresaanna merged commit 5176c9e into master Feb 19, 2015
@theresaanna theresaanna deleted the add_cached branch February 19, 2015 23:48
@shawnbot
Copy link
Contributor Author

👍 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants