|Number of watchers on Github||32|
|Number of open issues||0|
|Average time to close an issue||10 months|
|Average time to merge a PR||3 months|
|Open pull requests||0+|
|Closed pull requests||2+|
|Last commit||almost 3 years ago|
|Repo Created||over 7 years ago|
|Repo Last Updated||about 3 years ago|
|Organization / Author||rdegges|
|Do you use flask-heroku-cacheify? Leave a review!|
|View flask-heroku-cacheify activity|
|View on github|
|Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)|
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Automatic Flask cache configuration on Heroku.
Configuring your cache on Heroku can be a time sink. There are lots of different caching addons available on Heroku (Redis, Memcached, etc.), and among those -- lots of competitors.
flask-heroku-cacheify makes your life easy by automatically configuring your
Flask application to work with whatever caching addons you've got provisioned
on Heroku, allowing you to easily swap out addon providers at will, without any
trouble. And, just in case you don't have any suitable Heroku addons available,
flask-heroku-cacheify will default back to using local memory for your cache!
Instead of looking through documentation, testing stuff out, etc.,
flask-heroku-cacheify will just do everything for you :)
flask-heroku-cacheify, use pip.
$ pip install flask-heroku-cacheify
NOTE: If you're install
flask-heroku-cacheify locally, you'll need to
libmemcached-dev installed on your OS (with SASL support).
Next, modify your
requirements.txt file in your home directory, and add the
following to the bottom of your file:
The above will ensure that Heroku pulls in the required C header files (in case you decide to use memcached). This step is required.
Heroku has lots of available addons you can use for caching.
flask-heroku-cacheify currently works with them all! That means no matter
which option you choose, your cache will work out of the box, guaranteed!
Below is a list of the addons you can install to get started, you should have at least one of these activated on your Heroku app -- otherwise, your cache will be in 'local memory' only, and won't be very useful.
NOTE My favorite providers are MemCachier (for memcache), and openredis for redis. Both are equally awesome as cache providers. If you're in need of a stable cache provider for large applications, I'd recommend RedisGreen -- they use dedicated EC2 instances (which greatly improves your server power) and have an excellent interface.
flask-heroku-cacheify is super easy! In your
app.py (or wherever
you define your Flask application), add the following:
from flask_cacheify import init_cacheify app = Flask(__name__) cache = init_cacheify(app)
Once you've got your
cache global defined, you can use it anywhere in your
>>> from app import cache >>> cache.set('hi', 'there', 30) >>> cache.get('hi') 'there'
How does this work? In the background,
flask-heroku-cacheify is really just
automatically configuring the popular
Flask-Cache extension! This means, you
can basically skip down to this
part of their
documentation, and begin using all the methods listed there, without worrying
about setting up your caches! Neat, right?
For more information and examples of how to use your cache, don't forget to read the Flask-Cache documentation.
Like this software? If you really enjoy
flask-heroku-cacheify, you can show
your appreciation by:
Either way, thanks! <3
- Update docs - Updating code to support latest Flask release
- Upgrading to work with latest FLask release (thanks @mattstibbs).
- Removing MyRedis addon support -- the addon has been shut down.
- Fixing typos in README. - Adding Python 3 compatibility.
- Fixing bug with memcachier support (thanks @eriktaubeneck)!
- Adding proper documentation.
- Adding support for MyRedis. - Adding support for Redis Cloud. - Adding support for Redis To Go. - Adding support for openredis.
- Fixing bug with RedisGreen support.
- First *real* release! Supports MemCachier and RedisGreen!
- Pushing eigth release to PyPI (don't use this still!).
- Pushing seventh release to PyPI (don't use this still!).
- Pushing sixth release to PyPI (don't use this still!).
- Pushing fifth release to PyPI (don't use this still!).
- Pushing fourth release to PyPI (don't use this still!).
- Pushing third release to PyPI (don't use this still!).
- Pushing second release to PyPI (don't use this still!).
- Pushing first release to PyPI (don't use this yet!).
- Started work >:)