I'm currently using this code below to cache data. The ouput is saved with the WRITE statement. My question is, would it be better if I used the spew statement instead of the read statement? Also is there a way to read the date of the file this way if it's older than a week I could write over it.
Thanks,
Gerry
<IF $page lt 2>
<lower $q2><$searchdirectory="/a/"><$storesearch=($searchdirectory+$ret)><read $storesearch>
<fetch "http://1.1.1.1" $ret><$html=$ret>
<timport max=2 row $imports $html></timport>
<IF $EN="">
<fetch PARALLEL $fetchsearch><$html=$ret></fetch>
<lower $q2><$searchdirectory="/a/"><$storesearch=($searchdirectory+$ret)><WRITE SKIPONFAIL $storesearch><fmt "%s" $html></WRITE>
</IF>
<ELSE>
<fetch PARALLEL $fetchsearch><$html=$ret></fetch>
</if>
Thanks,
Gerry
<IF $page lt 2>
<lower $q2><$searchdirectory="/a/"><$storesearch=($searchdirectory+$ret)><read $storesearch>
<fetch "http://1.1.1.1" $ret><$html=$ret>
<timport max=2 row $imports $html></timport>
<IF $EN="">
<fetch PARALLEL $fetchsearch><$html=$ret></fetch>
<lower $q2><$searchdirectory="/a/"><$storesearch=($searchdirectory+$ret)><WRITE SKIPONFAIL $storesearch><fmt "%s" $html></WRITE>
</IF>
<ELSE>
<fetch PARALLEL $fetchsearch><$html=$ret></fetch>
</if>