function ThtWebDBApp.SendBufferedChunk(Const Value:string): Boolean;
var
a1:string;
t:TwhList;
begin
Result:=inherited SendBufferedChunk(Value);
//priority is on the in-memory version of the chunks OR MACROS
// OR whatever else this string might resolve to.
//IF IT could not get resolved, we proceed to look it up in the database!
if not Result
and assigned(DataSet)
and assigned(MemoField)
and (DataSet is TTable)
then begin
if fCacheDbChunks
and (pos('|'+uppercase(Value)+'|',fCacheDbFail)>0) then
exit;
Result:=TTable(DataSet).Findkey([uppercase(Value)]);
if Result then begin
a1:=MemoField.AsString;
Response.Send(a1);
if fCacheDbChunks then begin
t:=TwhList.create;
t.text:=a1;
Chunks.AddObject(uppercase(Value+'='+Value),t);
//do NOT free list. Chunks objects are freed by WebHub.
end;
end
else begin
fCacheDbFail:=fCacheDbFail+uppercase(Value)+'|';
inc(fCacheDbFailCount);
end;
end;
end;