[TYPO3-core] RFC #17167: Cache ExtDirect::getAPI calls
Ernesto Baschny [cron IT]
ernst at cron-it.de
Fri Jan 21 17:34:20 CET 2011
Steffen Gebert schrieb am 20.01.2011 19:31:
> This is a SVN patch request.
>
> Type: Bugfix
>
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=17167
>
> Branches:
> trunk
>
> Problem:
> There are about 5 ExtDirect::getAPI calls, which through ajax.php.
> An API of ~10 lines JS code is delivered and included as usual JavaScript.
> The response does not contain an Expires header and sends Cache-control:
> no-cache.
> However the API usually does not change, but the calls cost performance
> while BE loading.
>
> Solution:
> * Send correct headers
> * Add version number to API-inclusion-URLs, in case of we have updates
This is a nice addition, but I cannot really see any effect this had on
the behaviour of the browsers. When I reload a frame every browser which
I tested were redoing the ExtDirect API ajax request regardless of these
headers. On other resources (served by APache) I see that the browser
gets back a "304 Not Modified", because the request is:
If-Modified-Since: Fri, 21 Jan 2011 15:39:39 GMT
If-None-Match: "279c4-edf64c0"
So apache knows "nothing changed" and just sends 304.
But for the ExtDirect::getAPI a regular "200" and the content is always
happily returned. So I wonder what effect those headers could have
(maybe for proxies in between?). Anyways its not bad that we have that in!
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list