Page 1 of 1

Cache Control

PostPosted: 27 Mar 2015 16:06
by Jorge Sousa
We strongly suggest cgdevtools users to add the following code to increase the expiration time of static content:

Code: Select all
uses
  IW.HTTP.Reply;
 
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
    THttpReply.DefaultCacheTTL := 1440;  // 1440 minutes = 24 hours
    THttpReply.DefaultCacheControl := 'private';
end;