Skip to content

Instantly share code, notes, and snippets.

@pztrick
Created February 13, 2014 19:29
Show Gist options
  • Save pztrick/8982097 to your computer and use it in GitHub Desktop.
Save pztrick/8982097 to your computer and use it in GitHub Desktop.
from cloudcache import cloudcache
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