ietf-tools / www

A customized CMS for the IETF website
BSD 3-Clause "New" or "Revised" License
22 stars 45 forks source link

chore: Use iab as cache prefix #412

Closed microamp closed 3 months ago

microamp commented 3 months ago

Found one minor discrepancy when diffing against the previous prod config.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.72%. Comparing base (ca48a64) to head (a63e898).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #412 +/- ## ======================================= Coverage 82.72% 82.72% ======================================= Files 124 124 Lines 2599 2599 ======================================= Hits 2150 2150 Misses 449 449 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rjsparks commented 3 months ago

Why do you expect sharing a key prefix to be safe in this case? What's the other thing going into key generation that's guaranteed to avoid key collisions between the two wagtail instances? See https://github.com/django/django/blob/ca5cd3e3e8e53f15e68ccd727ec8fe719cc48099/django/core/cache/backends/base.py#L32-L40 - I think it's pretty likely that wagtail itself would be generating the same prefixes for things it would want to cache? Or does wagtail go out of its way to ensure the prefix is unique based on the config? (If so, point to the code that does so?)

rjsparks commented 3 months ago

(It may not matter as long as you guarantee that the ietf.org and iab.org instances are not sharing an instance of memcached, but if we ever were to put these back on one big host...)

kesara commented 3 months ago

(It may not matter as long as you guarantee that the ietf.org and iab.org instances are not sharing an instance of memcached, but if we ever were to put these back on one big host...)

Yeah, separation was the reason. Even on ietfa, the two sites did not share a single Memcached instance. But if we think they might share a single Memcache db, we should use the Helm variable for that.