'Warn about keys that would not be portable to the memcached
backend. This encourages (but does not force) writing backend-portable
cache code.'

def validate_key(self, key):

    if (len(key) > MEMCACHE_MAX_KEY_LENGTH):
        warnings.warn((u'Cache    key    will    cause    errors    if    used    with    memcached:    %s    (longer    than    %s)' % (key, MEMCACHE_MAX_KEY_LENGTH)), CacheKeyWarning)
    for char in key:
        if ((ord(char) < 33) or (ord(char) == 127)):
            warnings.warn((u'Cache    key    contains    characters    that    will    cause    errors    if    used    with    memcached:    %r' % key), CacheKeyWarning)
