(key, default=None)
return default
Gets an in-memory cache value

    :param key:
        The string key

    :param default:
        The value to return if the key has not been set, or the ttl expired

    :return:
        The cached value, or default
Gets an in-memory cache value
Gets an in - memory cache value
def get_cache(key, default=None):
    """
    Gets an in-memory cache value

    :param key:
        The string key

    :param default:
        The value to return if the key has not been set, or the ttl expired

    :return:
        The cached value, or default
    """

    struct = _channel_repository_cache.get(key, {})
    expires = struct.get('expires')
    if expires and expires > time.time():
        return struct.get('data')
    return default
def get_cache ( key , default = None ) : struct = _channel_repository_cache . get ( key , { } ) expires = struct . get ( 'expires' ) if expires and expires > time . time ( ) : return struct . get ( 'data' ) return default