Welcome to Centmin Mod Community
Become a Member

cache warmer script (included)

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

  1. ahmed

    ahmed Member

    226
    17
    18
    Feb 21, 2017
    Ratings:
    +23
    Local Time:
    4:46 PM
    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
    

     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,963
    6,918
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,420
    Local Time:
    12:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    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 :)