s4

changeset 405:6244bbb72400

Remove cache time stamp only when img data stream sent
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 08 Feb 2017 12:53:20 +0900
parents 084a4d35c98f
children 1af18eeeffb3
files s4-blog.sh
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-blog.sh	Wed Feb 08 12:24:18 2017 +0900
     1.2 +++ b/s4-blog.sh	Wed Feb 08 12:53:20 2017 +0900
     1.3 @@ -246,6 +246,7 @@
     1.4  	  fi
     1.5  	fi
     1.6       
     1.7 +	date "+%F %T" > $stampfile # Cache time stamp(is here good?)
     1.8  	cat<<EOF
     1.9  <tr id="$id">
    1.10  <td class="$tdcls">$picon${edit:+<a href="$elink+$edit">編集</a> }#$aid
    1.11 @@ -283,7 +284,6 @@
    1.12  		$fnb</a>
    1.13  		EOF
    1.14  		# !!NOTE!! Create row stamp ONLY WHEN imgcache is active
    1.15 -		date "+%F %T" > $stampfile
    1.16  	      else
    1.17  		query "SELECT hex(bin) FROM article_m WHERE rowid=$mrid;" \
    1.18  		    | unhexize \
    1.19 @@ -295,6 +295,7 @@
    1.20  	    		  -e "s|^|<a href=\"$catlink+$mrid\"><img src=\"data:image/$fmt,|" \
    1.21  			  -e "s|\$|\">$fnb</a>|"
    1.22  		# [ -d $td ] || mkdir -p "$td"
    1.23 +		rm -f "$stampfile" # img data stream is not suitable to cache
    1.24  		echo $tm > $tsfile
    1.25  	      fi
    1.26  	      ;;