Welcome to Centmin Mod Community
Register Now

cache warmer script (included)

Discussion in 'Feature Requests & Suggestions' started by ahmed, May 12, 2017.

  1. ahmed

    ahmed Active Member

    361
    49
    28
    Feb 21, 2017
    Ratings:
    +63
    Local Time:
    6:14 AM
    Hello

    this is an example for cache warmer script to be added after wordpress update script


    Code:
    #!/bin/bash
    ALIAS='@ddc.production'
    URL='DOMAIN'
    
    wget --quiet https://$URL/sitemap.xml --no-cache --output-document - | egrep -o "https://$URL[^<]+" | while read line; do
        time curl -A 'Cache Warmer' -s -L $line > /dev/null 2>&1
        echo $line
    done
    echo  cache warmed
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    49,764
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    2:14 PM
    Nginx 1.21.x
    MariaDB 10.x
    Nice thanks for sharing definitely something useful. I have been working on something similar for sites in general and not just wordpress. So we shall see :)