Bug 44009 - Get jpegPhoto in a way that it is possible to cache it (in grid tile view)
Get jpegPhoto in a way that it is possible to cache it (in grid tile view)
Status: RESOLVED MOVED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Florian Best
UMC maintainers
https://git.knut.univention.de/univen...
:
Depends on: 42229
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-21 17:07 CET by Jürn Brodersen
Modified: 2021-11-12 14:28 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Design
Max CVSS v3 score:


Attachments
draft patch (3.98 KB, patch)
2019-03-15 16:19 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2017-03-21 17:07:16 CET
Get jpegPhoto in a way that it is possible to cache it (in grid tile view)

For more infos: bug 42229, comment 6
Comment 1 Alexander Kläser univentionstaff 2017-03-22 11:24:14 CET
BTW, this might be a problem when changing the users profile picture and it does not change due to the old cache being still used. We could add the last modification timestamp of the user object to the GET request?!
Comment 2 Florian Best univentionstaff 2017-03-22 11:39:17 CET
This is already suggested in the original comment:

Suggestion (patch attachment 8553 [details]):
1. Don't query the image via xhr but via a regular GET request.
2. Create a Apache rewrite rule for …/udm/users/user/($etag/)?$dn/userphoto to /udm/image?flavor=...&dn=... → This allows the browser to cache the image
3. Set explicit cache control and expiration HTTP headers to make sure the images are cached for a long time, we could even set Last-Modified from the "modifyTimestamp" LDAP attribute. Generating some E-Tag would also be nice. Maybe we could even add some versioning to the URL, too, by adding the E-Tag into the URL: …/udm/users/user/$dn/$etag/image. Then the cache would immediately be invalidated when the image changes.
Comment 3 Florian Best univentionstaff 2019-03-15 16:19:36 CET
Created attachment 9931 [details]
draft patch

Didn't get this finished, still a lot of improvements needs to be done.