File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 2222 renderOutput ($ message );
2323}
2424
25-
26- // set cache to refresh once per day
27- $ timestamp = gmdate ("D, d M Y 23:59:00 " ) . " GMT " ;
28- header ("Expires: $ timestamp " );
29- header ("Last-Modified: $ timestamp " );
30- header ("Pragma: no-cache " );
31- header ("Cache-Control: no-cache, must-revalidate " );
25+ // set cache to refresh once per hour
26+ header ("Expires: " . gmdate ("D, d M Y H:i:s " , time () + 3600 ) . " GMT " );
27+ header ("Last-Modified: " . gmdate ("D, d M Y H:i:s " ) . " GMT " );
28+ header ("Cache-Control: public, max-age=3600 " );
3229
3330// redirect to demo site if user is not given
3431if (!isset ($ _REQUEST ["user " ])) {
4643 }
4744 $ stats = getContributionStats ($ contributions );
4845 renderOutput ($ stats );
49- } catch (InvalidArgumentException | AssertionError $ error ) {
46+ } catch (InvalidArgumentException | AssertionError $ error ) {
5047 renderOutput ($ error ->getMessage ());
5148}
You can’t perform that action at this time.
0 commit comments