MemCachier-powered WordPress Object Caching
Posted: December 19, 2012 Filed under: Libraries 1 Comment »MemCachier can now power your WordPress object cache thanks to a plugin Per Søderlind created. The WordPress object cache is used to cache computationally expensive operations such as complex database queries. By using Per’s MemCachier WordPress plugin, you can speed up page load times for your readers and get all the added benefits of using MemCachier to power your cache — easy setup, high availability, and an analytics dashboard.
To get started with the MemCachier WordPress plugin, visit the the WordPress MemCachier plugin page and click on “installation”. The instructions are simple, and although they’re catered specifically for AppFog, the MemCachier WordPress plugin will work in any of our supported partners. As long as you’ve configured the MEMCACHIER_SERVERS, MEMCACHIER_USERNAME, and MEMCACHIER_PASSWORD environment variables, the plugin will work.
You can learn more about the plugin on Per’s blog, and you can see a demo app here. Thanks for your contribution, Per!
MemCachier in Heroku Just Got Easier in Django!
Posted: May 23, 2012 Filed under: Libraries Leave a comment »Randall Degges just added MemCachier to his Django automatic memcache module, which makes setting up MemCachier in Django as easy as installing a module. All you need to do is:
$ heroku addons:add memcachier:25 $ pip install django-heroku-memcacheify
And add the following to settings.py:
from memcacheify import memcacheify
import os
os.environ['MEMCACHE_SERVERS'] = os.environ.get('MEMCACHIER_SERVERS', '')
os.environ['MEMCACHE_USERNAME'] = os.environ.get('MEMCACHIER_USERNAME', '')
os.environ['MEMCACHE_PASSWORD'] = os.environ.get('MEMCACHIER_PASSWORD', '')
CACHES = memcacheify()
Then, to test if it’s working, run:
$ heroku run python manage.py shell
Running python manage.py shell attached to terminal... up, run.1
Python 2.7.2 (default, Oct 31 2011, 16:22:04)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.core.cache import cache
>>> cache.set('memcache', 'ify!')
True
>>> cache.get('memcache')
'ify!'
>>>
Checkout django-heroku-memcacheify on github for more information. Thanks, Randall!
UPDATE: these instructions will be even easier once this pull request is merged. Once it’s merged, you won’t need to muck with environment variables at all.
MemCachier
Recent Comments