Created
February 13, 2014 19:29
-
-
Save pztrick/8982097 to your computer and use it in GitHub Desktop.
from cloudcache import cloudcache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from iron_cache import IronCache | |
import thread | |
credentials = settings.IRON_IO_CACHE.lstrip('ironcache://').rstrip('@').split(':') | |
class IronCacheAsync(IronCache): | |
def put_async(self, *args, **kwargs): | |
thread.start_new_thread(self.put, args, kwargs) | |
return None | |
cloudcache = IronCacheAsync(project_id=credentials[0], token=credentials[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment