memcached
memcache and wildcards
No, there isn’t a direct easy way to do this. The FAQ addresses this, and provides a kind of workaround: Deleting by Namespace While memcached does not support any type of wildcard deleting or deletion by namespace (since there are not namespaces), there are some tricks that can be used to simulate this. They do … Read more
MS Velocity vs Memcached for Windows?
We have done recently a fair amount of comparing of Velocity and Memcached. In the nutshell, we found Velocity to be 3x – 5x slower than Memcached, and (even more crucially) it does not have currently support for a multi-get operation. So at the moment, I would recommend going with Memcached. Also, another lesson we … Read more
Clear Memcached on Heroku Deploy
I deploy my applications using a bash script that automates GitHub & Heroku push, database migration, application maintenance mode activation and cache clearing action. In this script, the command to clear the cache is : heroku run –app YOUR_APP_NAME rails runner -e production Rails.cache.clear This works with Celadon Cedar with the Heroku Toolbelt package. I … Read more
best place to clear cache when restarting django server
It’s bad practice to put code in settings.py other than assignments. It’s better suited as a management command: from django.core.management.base import BaseCommand from django.core.cache import cache class Command(BaseCommand): def handle(self, *args, **kwargs): cache.clear() self.stdout.write(‘Cleared cache\n’) Which you can add to your project by sticking it in someapp/management/commands. For instance you could create a new app … Read more
Is Memcache recommended when using MongoDB?
The concept of using memcache stems from the idea that you have “extra RAM” sitting around somewhere. Both MongoDB and MySQL (and most DBs) will take every meg of RAM that they can get. In the case of the very common MySQL / Memcache, it is very well documented that using Memcache is more about … Read more