+ $cname = $ENV{"HOME"} . "/.ann/";
+ mkdir $cname unless -e $cname;
+ $cname .= "cache/";
+ mkdir $cname unless -e $cname;
+ $cname .= Digest::MD5::md5_hex $uri;
+ if($usecache && -e $cname) {
+ my(@s);
+ @s = stat $cname;
+ if((time - $s[9]) < 86400) {
+ my($buf);
+ open CACHE, "<:utf8", $cname;
+ $res .= $buf while read CACHE, $buf, 1024;
+ close CACHE;
+ return $res;
+ }
+ }
+