def get_cache_key(account, container=None, obj=None):
 if obj:
  if (not (account and container)):
   raise ValueError('Object cache key requires account and container')
  cache_key = ('object/%s/%s/%s' % (account, container, obj))
 elif container:
  if (not account):
   raise ValueError('Container cache key requires account')
  cache_key = ('container/%s/%s' % (account, container))
 else:
  cache_key = ('account/%s' % account)
 return cache_key

def get_cache_key ( account , container = None , obj = None ) : if obj : if ( not ( account and container ) ) : raise ValueError ( 'Object cache key requires account and container' ) cache_key = ( 'object/%s/%s/%s' % ( account , container , obj ) ) elif container : if ( not account ) : raise ValueError ( 'Container cache key requires account' ) cache_key = ( 'container/%s/%s' % ( account , container ) ) else : cache_key = ( 'account/%s' % account ) return cache_key
call into django to retrieve a cache key for the given url .