@_helpers.positional(<NUM_LIT:4>)<EOL><INDENT>def __init__(self, model, key_name, property_name, cache=None, user=None):<DEDENT>
super(StorageByKeyName, self).__init__()<EOL>if key_name is None:<EOL><INDENT>if user is None:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>key_name = user.user_id()<EOL><DEDENT>self._model = model<EOL>self._key_name = key_name<EOL>self._property_name = property_name<EOL>self._cache = cache<EOL>
Constructor for Storage.

        Args:
            model: db.Model or ndb.Model, model class
            key_name: string, key name for the entity that has the credentials
            property_name: string, name of the property that is a
                           CredentialsProperty or CredentialsNDBProperty.
            cache: memcache, a write-through cache to put in front of the
                   datastore. If the model you are using is an NDB model, using
                   a cache will be redundant since the model uses an instance
                   cache and memcache for you.
            user: users.User object, optional. Can be used to grab user ID as a
                  key_name if no key name is specified.