New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance simplecache to return 304 Not Modified header when ETag matches (Trac #2002) #2002
Comments
Attachment added by trac user milan on 40229222-06-06: view.php |
ewinslow wrote on 40313412-03-08 Bump for this. It would be a huge performance improvement. |
Milestone changed to |
codelust wrote on 41010892-03-08 Can the same be done to mod/profile/icondirect.php ? It has made a massive difference in the performance of my installation. |
Attachment added by trac user srokap on 41940789-01-22: cache_handler.php |
trac user srokap wrote on 41940804-03-28 This code (see attachment) was already tested, it might be wise to consider other etag generation method, and maybe extract this part to allow reuse in other places like profile/icondirect.php |
Title changed from |
cash wrote on 41948645-06-17 I don't think we need to hash the contents of the file. The date encoded in the URL should be good enough to tell whether the file has been updated. If that's true we could just do a hash of the URL for the etag. |
Attachment added by trac user srokap on 41959307-11-24: cache_handler.2.php |
trac user srokap wrote on 41959312-03-04 We were working on this second version (attachment) without problems. It uses md5 hash from modification date as a etag, hashing the URL itself would be a bit strange to me. |
Milestone changed to |
cash wrote on 42022308-12-10 I'm breaking this up into 3 tickets:
|
Title changed from |
Original ticket http://trac.elgg.org/ticket/2002 on 40229220-03-18 by trac user milan, assigned to unknown.
Elgg version: 1.8.1b1
I've noticed that although simplecache is used to precache content before sending it to the client. It isn't used to cache content on the client/browser.
In the case of elggs js and css views which are loaded in every page, they are statically generated on the server, but that content is never cached on the client.
I've patched simplecache/view.php to allow it to return a 304 header when a eTag and modified since date matches the ones which would be used to return the data.
The text was updated successfully, but these errors were encountered: