def METHOD_NAME(redis_key, regex, item_content, r_set):
    all_items = re.findall(regex, item_content)
    if r_set:
        if len(all_items) > 1:
            for item in all_items:
                r_serv_cache.sadd(redis_key, str(item))
            r_serv_cache.expire(redis_key, 360)
        elif all_items:
            r_serv_cache.sadd(redis_key, str(all_items[0]))
            r_serv_cache.expire(redis_key, 360)
    else:
        if len(all_items) > 1:
            for item in all_items:
                r_serv_cache.lpush(redis_key, str(item))
            r_serv_cache.expire(redis_key, 360)
        elif all_items:
            r_serv_cache.lpush(redis_key, str(all_items[0]))
            r_serv_cache.expire(redis_key, 360)