Bug 53465 - [5.0] UMC-Caching
[5.0] UMC-Caching
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Florian Best
Johannes Keiser
https://git.knut.univention.de/univen...
:
Depends on: 53680 37720
Blocks: 54047
  Show dependency treegraph
 
Reported: 2021-06-18 17:31 CEST by Florian Best
Modified: 2021-11-10 11:58 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): Cleanup, External feedback, Troubleshooting, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-06-18 17:31:18 CEST
We need to forward-port the patch.

+++ This bug was initially created as a clone of Bug #37720 +++

When we build e.g. the UMC-frontend package the files in the deb archive will have mtime=$(build-time).
When dpkg installs the package the mtime from these files are taken instead of the extraction time.
When apache serves the files now it uses the mtime value with the build time.

Especially internally it is strange behavior as we are often working with VM's with set time in the past. When the file-mtime is in the future apache takes the current system time as Last-Modified value. → This prevents firefox from invalidating its cache.

Maybe we should trigger a touch over all UMC-apache-files in the postinst of UMC.
We probably can remove the $js-hash$ then, too and let apache handle caching completely (I suspect apache to do it correctly, our caching-workarounds probably exists due to this described problem. Chromium+Firefox can handle Last-Modified, and in UCS 4.0 we are supporting only IE>=9 → that should also work).

curl -i http://$host/univention-management-console/login.html | grep -i -e Etag -e Last-Modified
date --set '2014-12-13 14:15:16+0200'
Comment 1 Florian Best univentionstaff 2021-06-28 17:46:39 CEST
Created a merge request: https://git.knut.univention.de/univention/ucs/-/merge_requests/110
QA: REOPEN for merging.
Let's wait until Bug #37720 is verified.
Comment 2 Florian Best univentionstaff 2021-10-05 12:20:29 CEST
univention-web.yaml
60d4cd13c6b3 | Bug #53465: replace Expire-caching with Cache-Control "must-revalidate, max-age=..."

univention-web (4.0.1-42)
03ad18f4a421 | Bug #53465: ucslint: debian/changelog: not strict-monotonically increasing by time
a2234ba78e79 | Bug #53465: enable conditional requests for gzip compressed requests
08feb4901931 | Bug #53465: call umc_frontend_new_hash also in univention-web postinst
60d4cd13c6b3 | Bug #53465: replace Expire-caching with Cache-Control "must-revalidate, max-age=..."

univention-management-console.yaml
42f754b44af6 | Bug #53465: set explicit caching control in maintenance mode

univention-management-console (12.0.12-16)
03ad18f4a421 | Bug #53465: ucslint: debian/changelog: not strict-monotonically increasing by time
42f754b44af6 | Bug #53465: set explicit caching control in maintenance mode

univention-lib.yaml
7573485377ec | Bug #53465: touch all HTML/JS/CSS files in postinst via umc_frontend_new_hash

univention-lib (9.0.11-6)
03ad18f4a421 | Bug #53465: ucslint: debian/changelog: not strict-monotonically increasing by time
7573485377ec | Bug #53465: touch all HTML/JS/CSS files in postinst via umc_frontend_new_hash
Comment 3 Johannes Keiser univentionstaff 2021-10-06 11:20:43 CEST
OK: code is ported
OK: same behaviour as 4.4
OK: yaml
-> verified