Números aleatorios con Javascript en servidor Nginx Fastcgi Cache

Nginx Fastcgi Cache no genera números aleatorios en PHP debido al cache del código HTML generado.

Ejemplo para mostrar imágenes aleatorias en un slider diferentes en cada reload de la pagina: https://pachamama.pe/

<php 
    $img_width = get_custom_header()->width;
    $img_height = get_custom_header()->height;
?>


<script>
// if only one argument is passed, it will assume that is the high
// limit and the low limit will be set to zero
// so you can use either r = new randomeGenerator(9);
// or r = new randomGenerator(0, 9);
function randomGenerator(low, high) {
    if (arguments.length < 2) {
        high = low;
        low = 0;
    }
    this.low = low;
    this.high = high;
    this.reset();
}

randomGenerator.prototype = {
    reset: function() {
        this.remaining = [];
        for (var i = this.low; i <= this.high; i++) {
            this.remaining.push(i);
        }
    },
    get: function() {
        if (!this.remaining.length) {
            this.reset();
        }
        var index = Math.floor(Math.random() * this.remaining.length);
        var val = this.remaining[index];
        this.remaining.splice(index, 1);
        return val;        
    }
}


jQuery( document ).ready(function() {
    var r = new randomGenerator(1, 50);

    var img_url1 = "/wp-content/img/slide/" + r.get().toString() + "-sl.jpg";
    var img_url2 = "/wp-content/img/slide/" + r.get().toString() + "-sl.jpg";
    var img_url3 = "/wp-content/img/slide/" + r.get().toString() + "-sl.jpg";

    var img_width = "<?php echo $img_width; ?>";
    var img_height = "<?php echo $img_height; ?>";

    jQuery('#img_slide1').attr( { src: img_url1, title: 'MADRE TIERRA', alt: '', width: img_width, height: img_height} );
    jQuery('#img_slide2').attr( { src: img_url2, title: 'MADRE TIERRA', alt: '', width: img_width, height: img_height} );
    jQuery('#img_slide3').attr( { src: img_url3, title: 'MADRE TIERRA', alt: '', width: img_width, height: img_height} );

    jQuery("#wowslider-container").wowSlider({effect:"rotate",prev:"",next:"",duration:20*100,delay:20*100,width:img_width,height:img_height,autoPlay:true,stopOnHover:false,loop:false,bullets:true,caption:true,captionEffect:"slide",controls:true,logo:"",images:0});
});
</script>